99 bottles of beer: Difference between revisions
Content added Content deleted
(Add bruijn) |
|||
Line 1,462: | Line 1,462: | ||
Then, the two folds join all the individual lines together. |
Then, the two folds join all the individual lines together. |
||
=={{header|Bruijn}}== |
|||
<syntaxhighlight lang="bruijn"> |
|||
:import std/Combinator . |
|||
:import std/Number . |
|||
:import std/String . |
|||
main y [[rec]] (+99) |
|||
rec =?0 case-end case-rec |
|||
case-rec n ++ t1 ++ n ++ t2 ++ t3 ++ n ++ t1 ++ "\n" ++ (1 --0) |
|||
n number→string 0 |
|||
t1 " bottles of beer on the wall\n" |
|||
t2 " bottles of beer\n" |
|||
t3 "Take one down, pass it around\n" |
|||
case-end empty |
|||
</syntaxhighlight> |
|||
=={{header|C}}== |
=={{header|C}}== |