Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fizzBuzz :: [Int] -> [String]
- fizzBuzz listOfNumbers = [fizzify x | x <- listOfNumbers]
- where
- fizzify :: Int -> String
- fizzify num
- | fizz && buzz = "FizzBuzz"
- | fizz = "Fizz"
- | buzz = "Buzz"
- | otherwise = show num
- where fizz = num `mod` 3 == 0
- buzz = num `mod` 5 == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement