to bottle :i if :i = 0 [output [No more bottles of beer]] if :i = 1 [output [One bottle of beer]] output se :i [bottles of beer] end to verse :i pr (se bottle :i [ on the wall,] bottle :i) pr [Take one down, pass it around] pr se bottle :i - 1 [ on the wall] end to sing :i if :i = 0 [stop] verse :i sing :i - 1 end #Using it: sing 99