The Twelve Days of Christmas: Difference between revisions
Content added Content deleted
(→{{header|Picat}}: Added subsections) |
|||
Line 3,904: | Line 3,904: | ||
=={{header|Picat}}== |
=={{header|Picat}}== |
||
===List comprehension=== |
|||
<lang Picat>go => |
<lang Picat>go => |
||
Days = "first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelfth".split(" "), |
Days = "first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelfth".split(" "), |
||
Line 3,925: | Line 3,926: | ||
nl.</lang> |
nl.</lang> |
||
===Definite clause grammars (DCG)=== |
|||
DCG version: |
|||
<lang Picat>go2 ?=> |
<lang Picat>go2 ?=> |
||
lyrics(Ls,[]), |
lyrics(Ls,[]), |
||
Line 3,966: | Line 3,966: | ||
day(eleventh) --> "Eleven pipers piping". |
day(eleventh) --> "Eleven pipers piping". |
||
day(twelth) --> "Twelve drummers drumming".</lang> |
day(twelth) --> "Twelve drummers drumming".</lang> |
||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |