Last active
December 20, 2015 08:29
-
-
Save Diullei/6100573 to your computer and use it in GitHub Desktop.
FizzBuzz implementation using Haskell
http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz
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
{- | |
FizzBuzz implementation using Haskell | |
http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz | |
-} | |
fizzBuzz = [ | |
if x `mod` 3 == 0 then | |
"Fizz" | |
else | |
if x `mod` 5 == 0 then | |
"Buzz" | |
else | |
show x | |
| x <- take 100 [1..] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment