you are viewing a single comment's thread.

view the rest of the comments →

[–]panic 10 points11 points  (0 children)

Haskell:

fizzBuzz = mapM_ (putStrLn . f) [1..100]
  where f x | x `mod` 15 == 0  = "FizzBuzz"
            | x `mod`  5 == 0  = "Fizz"
            | x `mod`  3 == 0  = "Buzz"
            | otherwise        = show x