for n = 99 to 0 step -1 { str = getBottleString[n] println[str + " of beer on the wall, " + lc[str] + " of beer."] if (n == 0) println["Go to the store and buy some more, 99 bottles of beer on the wall."] else println["Take one down and pass it around, " + lc[getBottleString[n-1]] + " of beer on the wall.\n"] } getBottleString[n] := (n==0 ? "No more" : n) + " bottle" + (n==1 ? "" : "s")