FizzFizz by konstantin

f n=(if n`mod`3==0||n`mod`5==0 then g else print)n
g n=if n`mod`3==0 then putStr"Fizz">>g(n`div`3) else if n`mod`5==0 then putStr"Buzz">>g(n`div`5) else putStrLn""
main=mapM f[1..100]

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

download

return to the top page