FizzBuzz: Difference between revisions

Content added Content deleted
Line 11,753: Line 11,753:


<syntaxhighlight lang=yaml">
<syntaxhighlight lang=yaml">
map:
f(x):
- s =:
- (x):
str:
- s =:
- if (zero? mod(x 3)): "Fizz"
str:
- if (zero? mod(x 5)): "Buzz"
- if (zero? mod(x 3)): "Fizz"
- if (zero? mod(x 5)): "Buzz"
- println:
- println:
if (empty? s): [x, s]
if (empty? s): [x, s]
map: [f, range(1 101)]
- range(1 101)
</syntaxhighlight>
</syntaxhighlight>