The Twelve Days of Christmas: Difference between revisions

Add Janet
(Add MACRO-11)
(Add Janet)
Line 2,539:
 
singCarol=: LF joinstring makeVerses</syntaxhighlight>
 
=={{header|Janet}}==
<syntaxhighlight lang="janet">(def days ["first" "second" "third"
"fourth" "fifth" "sixth"
"seventh" "eighth" "ninth"
"tenth" "eleventh" "twelfth"])
(def gifts ["A partridge in a pear tree."
"Two turtle doves and"
"Three french hens"
"Four calling birds"
"Five golden rings"
"Six geese a-laying"
"Seven swans a-swimming"
"Eight maids a-milking"
"Nine ladies dancing"
"Ten lords a-leaping"
"Eleven pipers piping"
"Twelve drummers drumming"])
(var v "")
(eachp [i d] days
(print "On the " d " day of Christmas")
(print "My true love gave to me")
(set v (string (in gifts i) "\n" v))
(print v))</syntaxhighlight>
 
=={{header|Java}}==
1

edit