99 bottles of beer: Difference between revisions
→{{header|YAMLScript}}
m (used the inline lambdas, and auto property setter) |
|||
Line 13,887:
=={{header|YAMLScript}}==
<syntaxhighlight lang="yaml">
#!/usr/bin/env yamlscript
main(number=99):▼
map:▼
- paragraph▼
- range(number, 0, -1)▼
# Print the verses to "99 Bottles of Beer"
paragraph(num): |▼
#
# usage:
# yamlscript 99-bottles.ys [<count>]
▲defn main(number=99):
▲ map(say):
▲defn paragraph(num): |
$(bottles num) of beer on the wall,
$(bottles num) of beer.
Line 13,900 ⟶ 13,905:
$(bottles (num - 1)) of beer on the wall.
defn bottles(n):
(n == 0)
(n == 1)
:else
</syntaxhighlight>
=={{header|Yorick}}==
|