main :: IO ()
main = do putStrLn "FizzBuzz Upto: "
n <- getLine
printAll $ map fizzbuzz [1..(read n :: Int)]
where
printAll [] = getLine >> return ()
printAll (x:xs) = putStrLn x >> printAll xs
fizzbuzz n
| mod n 15 == 0 = "FizzBuzz"
| mod n 5 == 0 = "Buzz"
| mod n 3 == 0 = "Fizz"
| otherwise = show n
main = putStr "FizzBuzz Upto: " >> getLine >>= mapM_ (putStrLn . fizzbuzz) . enumFromTo 1 . read
where
fizzbuzz n
| mod n 15 == 0 = "FizzBuzz"
| mod n 5 == 0 = "Buzz"
| mod n 3 == 0 = "Fizz"
| otherwise = show n
I'd learn Haskell but the disk space GHC would've taken up I've already given to L^aT_eX. As much as I have free, I just don't want to use all my bandwidth on system updates.