twelvedays.r prints out all the lyrics for the popular Christmas song, The Twelve Days of Christmas.
Not setup is required, just doit.
Evaluate the script directly out of the rebol.org library with
>> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=twelvedays.ror locally with
>> do %twelvedays.r
This script is a fair example of information hiding. The Twelve_Days object! encapsulates a function, Sing that also encapsulates another function, Gift. Both of these inner functions make proper use of local variables.
The script only exposes the Twelve_Days object into the global name space. Everything else is hidden within this naming context.
Plus you get to learn the proper lyrics for the Twelve Days of Christmas rhyme.
Nothing to break here.
%twelvedays.r | Author: Unknown |
Twelve Days of Christmas | Rhyme originally in Mirth without Mischief, circa 1780 |