Skip to content

Instantly share code, notes, and snippets.

@knzm
Created August 23, 2012 11:02
Show Gist options
  • Select an option

  • Save knzm/3435553 to your computer and use it in GitHub Desktop.

Select an option

Save knzm/3435553 to your computer and use it in GitHub Desktop.
fizzbuzz x
| (mod x 15 == 0) = "FizzBuzz"
| (mod x 3 == 0) = "Fizz"
| (mod x 5 == 0) = "Buzz"
| otherwise = show x
main = print $ take 100 $ map fizzbuzz [1..]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment