Skip to content

Instantly share code, notes, and snippets.

@kentaro
Created January 6, 2013 09:13
Show Gist options
  • Save kentaro/4466218 to your computer and use it in GitHub Desktop.
Save kentaro/4466218 to your computer and use it in GitHub Desktop.
FizzBuzz in Haskell
fizzBuzz n = take n [
if (m `mod` 15) == 0 then "FizzBuzz"
else if (m `mod` 3) == 0 then "Fizz"
else if (m `mod` 5) == 0 then "Buzz"
else show m
| m <- [1..] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment