Skip to content

Instantly share code, notes, and snippets.

@noahlt
Created December 18, 2013 02:21
Show Gist options
  • Save noahlt/8016335 to your computer and use it in GitHub Desktop.
Save noahlt/8016335 to your computer and use it in GitHub Desktop.
FizzBuzz in Haskell — I'm sure this has been done before, but this one is mine.
mapM_ putStrLn [ if x `mod` 15 == 0 then "fizzbuzz" else if x `mod` 3 == 0 then "fizz" else if x `mod` 5 == 0 then "buzz" else show x | x <- [1..100]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment