FizzBuzz: Difference between revisions
Content deleted Content added
Line 5,262: | Line 5,262: | ||
=={{header|Joy}}== |
=={{header|Joy}}== |
||
The following program first defines a function "out", |
The following program first defines a function "out", that 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> |
|||
[[ 3 rem null] "Fizz"] |
|||
[[ 5 rem null] "Buzz"] |
|||
[]] cond |
|||
[[ 5 rem null] "Buzz"] |
|||
⚫ | |||
[]] cond |
|||
⚫ | |||
100 [] [out] primrec.</ |
100 [] [out] primrec.</syntaxhighlight> |
||
=={{header|jq}}== |
=={{header|jq}}== |