Created
October 9, 2013 16:00
-
-
Save thunklife/6903584 to your computer and use it in GitHub Desktop.
A newbie's attempt at FizzBuzz as a list comprehension in Haskell.
This file contains hidden or 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 :: [Integer] -> [String] | |
| fizzBuzz list = [if mod el 15 == 0 then "FIZZBUZZ" else if mod el 3 == 0 then "FIZZ" else if mod el 5 == 0 then "BUZZ" else show el | el <- list] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment