Skip to content

Instantly share code, notes, and snippets.

@jsl
Created September 19, 2013 20:15
Show Gist options
  • Save jsl/6629210 to your computer and use it in GitHub Desktop.
Save jsl/6629210 to your computer and use it in GitHub Desktop.
FizzBuzz Haskell Version
toFizzBuzz :: Integer -> String
toFizzBuzz n
| n `mod` 3 == 0 = "Fizz"
| n `mod` 5 == 0 = "Buzz"
| otherwise = show n
fizzBuzzSeries :: [String]
fizzBuzzSeries = map toFizzBuzz [1..]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment