## Tower of Hanoi by Lost_dog(Thanks to rst76)

main=interact$(\n->n%"ABC"++'\n':reverse(n%"CBA")).read
0%_=[]
n+1%[x,y,z]=n%[x,z,y]++x:n%[y,x,z]

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

download

return to the top page