Simple Example: MAPPER

Here's a simple MAPPER RUN that does the "ninety-nine bottles of beer" countdown:

MAPPER

.bottles of beer (Peter Adlerton, 8/31/05, http://99-bottles-of-beer.net)
*===============================================================================
@ldv <bottles>i2=99,<name>a7=bottles .
@brk .
@0010: .
<bottles>(p) <name>(p) of beer on the wall, <bottles>(p) <name>(p) of beer,
@if <bottles> > 0 . ;gto 0020 ;.
@dec <bottles> if <bottles> = 0,(0020) ;if <bottles> = 1 ldv <name>=bottle ;.
Take 1 down, pass it around, <bottles>(p) <name>(p) of beer on the wall.

@gto 0010 .
@0020: .
Take 1 down, pass it around, no more bottles of beer on the wall.
@gto end .