Collatz Problem by nobsun

main=mapM print.f.read=<<getLine;f 1=[1];f n|odd n=n:f(3*n+1)|1<2=n:f(div n 2)

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

download

return to the top page