99 bottles of beer: Difference between revisions

m
m (→‎{{header|Wren}}: Minor tidy)
imported>Arakov
Line 3,972:
= self.toPrintable() + (self != 1).iif(" bottles"," bottle");
bottleEnumerator() = new Variable(self).doWith::(n)
{
^ new Enumerator
Line 3,982:
.printLine(n.bottleDescription()," of beer")
.printLine("Take one down, pass it around")
.printLine((n.reduce:(1)).bottleDescription()," of beer on the wall");
reset() {}
Line 3,995:
var bottles := 99;
bottles.bottleEnumerator().forEach:(printingLn)
}</syntaxhighlight>
{{out}}
Anonymous user