Twelve Days of Christmas by notogawa

main=putStr$take 2395(do n<-[0..11];"On the "++words"first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelfth"!!n++" day of Christmas,\nmy true love sent to me\n"++scanl(\a b->b++",\n"++a)"A"(lines"Two turtle doves\nThree French hens\nFour calling birds\nFive golden rings\nSix geese a-laying\nSeven swans a-swimming\nEight maids a-milking\nNine ladies dancing\nTen lords a-leaping\nEleven pipers piping\nTwelve drummers drumming")!!n++drop(4*0^n)"nd a partridge in a pear tree.\n\n")++"!"

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

download

return to the top page