main = putStr . unlines $ fizzbuzz 100 fizzbuzz m = map f [1..m] where f n | n `mod` 15 == 0 = "FizzBuzz" f n | n `mod` 3 == 0 = "Fizz" f n | n `mod` 5 == 0 = "Buzz" f n = show n
wnoise comments on Open Thread: March 2010, part 2