The lyrics follow this form:
- 99 bottles of beer on the wall
- 99 bottles of beer
- Take one down, pass it around
98 bottles of beer on the wall
- 98 bottles of beer on the wall
- 98 bottles of beer
- Take one down, pass it around
- 97 bottles of beer on the wall
Transcript clear.Smalltalk at: #sr put: 0 ; at: #s put: 0 .sr := Dictionary new.sr at: 0 put: ' bottle' ;at: 1 put: ' bottles' ;at: 2 put: ' of beer' ;at: 3 put: ' on the wall' ;at: 4 put: 'Take one down, pass it around' .99 to: 0 by: -1 do: [:v | Transcript show: v .( v == 1 ) ifTrue: [ s := 0. ]ifFalse: [ s := 1. ].Transcript show: (sr at:s) ; show: (sr at:2) ; show: (sr at:3) ; cr.Transcript show: v.Transcript show: (sr at:s) ; show: (sr at:2) ; cr.(v ~~ 0) ifTrue: [ Transcript show: (sr at:4) ; cr. ].].
99 bottles of beer on the wall99 bottles of beerTake one down, pass it around98 bottles of beer on the wall98 bottles of beerTake one down, pass it around97 bottles of beer on the wall97 bottles of beerTake one down, pass it around