union

Returns the union of two sequences, a sequence containing every element of sequence1 and sequence2.

If the same element appears in both argument sequences, this will not cause it to appear twice in the result sequence.  However, if the same element appears more than once in a single argument sequence, it may appear more than once in the result sequence.

test is used for all comparisons.  It is always called with an element from sequence1 as its first argument and an element from sequence2 as its second argument.  The order of elements in the new-sequence is not specified.

new-sequence may or may not share structure with sequence1 or sequence2.

union (#("butter", "flour", "sugar", "salt", "eggs"),
#("eggs", "butter", "mushrooms", "onions", "salt"),
test: \=)
⇒ #("salt", "butter", "flour", "sugar", "eggs",
"mushrooms", "onions")

Exported from

Modifiers

open

Arguments

sequence1An instance of <sequence>.
sequence2An instance of <sequence>.
test:An instance of <function>.  The default is ==.

Values

new-sequenceAn instance of <sequence>.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of collections whose keys are consecutive integers starting from zero.
The class of objects that can be applied to arguments.
Compares two objects for identity.