Skip to content

Instantly share code, notes, and snippets.

@ignacioiglesias
Created September 17, 2012 05:42
Show Gist options
  • Save ignacioiglesias/3735747 to your computer and use it in GitHub Desktop.
Save ignacioiglesias/3735747 to your computer and use it in GitHub Desktop.
module Main where
fizz :: Integer -> String
fizz x
| x `mod` 15 == 0 = "FizzBuzz"
| x `mod` 5 == 0 = "Buzz"
| x `mod` 3 == 0 = "Fizz"
| otherwise = show x
main =
print (map fizz [1..100])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment