fizzBuzzCriterion :: Int -> String fizzBuzzCriterion n | n `mod` 15 == 0 = "FizzBuzz" | n `mod` 3 == 0 = "Fizz" | n `mod` 5 == 0 = "Buzz" | otherwise = show n fizzBuzz :: Int -> [String] fizzBuzz n = [fizzBuzzCriterion(x) | x <- [1..n]] main :: IO() main = do n <- readLn :: IO Int mapM_ putStrLn $ fizzBuzz n