Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. main = putStrLn $ unlines $ map fb [1..]
  2. fb n
  3.   | f && b = "FizzBuzz"
  4.   | f = "Fizz"
  5.   | b = "Buzz"
  6.   | otherwise = show n
  7.   where
  8.     f = mod n 3 == 0
  9.     b = mod n 5 == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement