Back and forth by hoozie

i=p=0
"$System.in".split().sum{s->b=i++%2
l=s.size()
p-=b*l
println' '*p+(b?s.reverse():s)
p+=b?0:l}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page