Collatz Problem by Lost_dog

main=readLn>>=mapM print.f
f 1=[1]
f x|odd x=x:f(3*x+1)|1>0=x:f(x`div`2)

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

download

return to the top page