RosettaCodeData/Task/FizzBuzz/Haskell/fizzbuzz-4.hs
2023-07-01 13:44:08 -04:00

5 lines
231 B
Haskell

main = mapM_ putStrLn $ take 100 $ zipWith show_number_or_fizzbuzz [1..] fizz_buzz_list
show_number_or_fizzbuzz x y = if null y then show x else y
fizz_buzz_list = zipWith (++) (cycle ["","","Fizz"]) (cycle ["","","","","Buzz"])