Created
November 13, 2012 22:57
-
-
Save esmevane/4069005 to your computer and use it in GitHub Desktop.
[Haskell] Fizz buzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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