Twelve Days of Christmas by henkma

main=mapM putStrLn$do x<-[11,10..0];("On the "++words"twelf eleven ten nin eigh seven six fif four third second first"!!x++[c|c<-"th",x<9]++" day of Christmas,\nmy true love sent to me"):x`drop`lines("Twelve drummers drumm@Eleven pipers pip@Ten lords a-leap@Nine ladies danc@Eight maids a-milk@Seven swans a-swimm@Six geese a-lay@Five golden rings,\nFour calling birds,\nThree French hens,\nTwo turtle doves,">>=f)++['A':[c|c<-"nd a",x<11]++" partridge in a pear tree"++".!"!!(0^x):"\n"]
f '@'="ing,\n"
f x=[x]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).


return to the top page