Anagram generator: Difference between revisions
Content deleted Content added
m →{{header|jq}}: tidy |
|||
Line 252: | Line 252: | ||
# input: an array to be extended with an additional dictionary word. |
# input: an array to be extended with an additional dictionary word. |
||
# output: a stream of arrays with additional words |
# output: a stream of arrays with additional words |
||
# selected from the characters in the string $letters. |
|||
# The input array should be in alphabetical order; if |
# The input array should be in alphabetical order; if it is, |
||
# so will the output array. |
|||
def extend($letters; $dict): |
def extend($letters; $dict): |
||
if $letters == "" then . |
if $letters == "" then . |
||
Line 329: | Line 331: | ||
["offer","xi"] |
["offer","xi"] |
||
</pre> |
</pre> |
||
=={{header|Julia}}== |
=={{header|Julia}}== |