=for advent_year 2008 =for advent_day 6 =for advent_title Baby it's cold outside, so why don't we tuck into a curry? =for advent_author David Westbrook It's the time of the year for caroling, and that means everyone's favorite B. Being a A, we'd like a shortcut for constructing each verse, which boils down to a function (lines 3-8) that simply generates the form: =begin pre On the ? day of Christmas my true love gave to me ..., and a partridge in a pear tree. =end pre M will allow us to call that function for the current verse (line 12), and then create a new function (line 13), which includes the prose to date, to use for the next verse. The C and C A create a way to prepend our arguments to generate the correct order; alternativelyN<1> we could C and have C<$fn> just C, but this way spices things up! Other tasty recipes can be found in the would actually be better for A. So, putting everything together, we can eat sing along with the last verse as generated: =begin pre On the twelfth day of Christmas my true love gave to me twelve drummers drumming, eleven pipers piping, ten lords a-leaping, nine ladies dacing, eight maids a-milking, seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree. =end pre =sourcedcode mod6.pl 1. Of course, simple loop/array solutions work as well; but TMTOWTDI and fun/holiday cheer is as a good reason as any! =begin eds Our resident discordian editor offers A. =end eds