FizzBuzz: Difference between revisions

m
Line 5,262:
 
=={{header|Joy}}==
The following program first defines a function "out", whichthat handles the Fizz / Buzz logic, and then loops from 1 to 100 mapping the function onto each number, and printing ("put") the output.
<syntaxhighlight lang=Joy>DEFINE out == [[[15 rem null] "FizzBuzz"]
<lang Joy>
DEFINE out == [[[15 3 rem null] "FizzBuzzFizz"]
[[ 35 rem null] "FizzBuzz"]
[]] cond
[[ 5 rem null] "Buzz"]
[putchars pop] [put] ifstring '\n putch.
[]] cond
[putchars pop] [put] ifstring '\n putch.
 
100 [] [out] primrec.</langsyntaxhighlight>
 
=={{header|jq}}==
153

edits