Anagram generator: Difference between revisions

Content deleted Content added
Peak (talk | contribs)
Peak (talk | contribs)
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 selected from the characters in the string $letters.
# 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 so, so will the output array.
# 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}}==