The Twelve Days of Christmas: Difference between revisions

Content added Content deleted
m (→‎{{header|Wren}}: Changed to Wren S/H)
(→‎{{header|APL}}: move leading newline into day)
Line 473: Line 473:
gift ← { ⍵ ⌷ 'A partridge in a pear tree.' 'Two turtle doves, and' 'Three French hens,' 'Four calling birds,' 'Five gold 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,' }
gift ← { ⍵ ⌷ 'A partridge in a pear tree.' 'Two turtle doves, and' 'Three French hens,' 'Four calling birds,' 'Five gold 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,' }


day ← { ⎕ ← 'On the',(ord ⍵),'day of Christmas, my true love sent to me:' ⋄ { ⎕ ← gift ⍵ } ¨ ⌽⍳⍵ }
day ← { ⎕ ← (⎕ucs 10),'On the',(ord ⍵),'day of Christmas, my true love sent to me:' ⋄ { ⎕ ← gift ⍵ } ¨ ⌽⍳⍵ }


{ ⎕←⎕ucs 10⋄day ⍵ } ¨ ⍳12</syntaxhighlight>
day ¨ ⍳12</syntaxhighlight>


{{Out}}
{{Out}}