Skip to content

Instantly share code, notes, and snippets.

@esmevane
Created November 13, 2012 22:57
Show Gist options
  • Save esmevane/4069005 to your computer and use it in GitHub Desktop.
Save esmevane/4069005 to your computer and use it in GitHub Desktop.
[Haskell] Fizz buzz
fb :: [Integer] -> [String]
fb list = [ fizzbuzz element | element <- list ]
where fizzbuzz x = fizz x ++ buzz x
where fizz x = if x `mod` 3 == 0 then "Fizz" else ""
buzz x = if x `mod` 5 == 0 then "Buzz" else ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment