99 bottles of beer: Difference between revisions

imported>Arakov
Line 13,938:
=={{header|YAMLScript}}==
<syntaxhighlight lang="yaml">
#!/usr/bin/env yamlscriptys-0
 
# Print the verses to "99 Bottles of Beer"
#
# usage:
# yamlscriptys 99-bottles.ys [<count>]
 
defn main(&[number=99]):
each [n ((number || 99) .. 1)]:
map(say):
map(paragraph)say:
(numberparagraph: .. 1)n
 
defn paragraph(num): |
Line 13,957:
 
defn bottles(n):
???cond:
(n == 0) : "No more bottles"
(n == 1) : "1 bottle"
:else :str(n "$n bottles")</syntaxhighlight>
</syntaxhighlight>
 
=={{header|Yorick}}==
55

edits