Jump to content

The Twelve Days of Christmas: Difference between revisions

→‎{{header|APL}}: move leading newline into day
m (→‎{{header|Wren}}: Changed to Wren S/H)
(→‎{{header|APL}}: move leading newline into day)
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,' }
 
day ← { ⎕ ← (⎕ucs 10),'On the',(ord ⍵),'day of Christmas, my true love sent to me:' ⋄ { ⎕ ← gift ⍵ } ¨ ⌽⍳⍵ }
 
{ ⎕←⎕ucs 10⋄day ⍵ }day ¨ ⍳12</syntaxhighlight>
 
{{Out}}
1,480

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.