12 lines
246 B
Text
12 lines
246 B
Text
output =
|
|
range(1, 100)
|
|
|> map(fizzBuzz)
|
|
|> printLines
|
|
|
|
fizzBuzz(n) =
|
|
if result == "" then n else result
|
|
where result = fizzBuzzString(n)
|
|
|
|
fizzBuzzString(n) =
|
|
(if n % 3 == 0 then "Fizz" else "")
|
|
+ (if n % 5 == 0 then "Buzz" else "")
|