
bottle{match} =
   0 -> "no more bottles"
   1 -> "one bottle"
   n -> '{n} bottles'

action{match} =
   0 -> "Go to the store and buy some more,"
   n -> "Take one down and pass it around,"

capitalize{s} =
   s[0].toUpperCase{} + s.substring{1}

0..99 each i ->
   n = 99 - i
   print '{capitalize{bottle{n}}} of beer on the wall, {bottle{n}} of beer.'
   print '{action{n}} {bottle{[n + 99] mod 100}} of beer on the wall.'
   print ""
