Back and forth by clock

n=0;m=1;"$System.in".split().each{s=" "*n+it;n+=it.size()*m;m=-m;println~m?" "*n+it.reverse():s}

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

download

return to the top page