Union
The union of the argument collections, sorted and de-duplicated; lists give a list, sets a set.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Union (set theory)MathWorldUnionWikidataQ185359Britannicatopic/union-set-theoryFungrimUnionWolfram LanguageUnion!Union(a, b, …)the sorted, de-duplicated union of the lists, as a (of sets, as a ).Typed signatures
| Type | Package | Applies |
|---|---|---|
(any+) -> collection | combinatoricsreplaces compute-engine | always |
(any+) -> set | compute-engine | always |
Details
- Duplicates within and across all the argument collections are removed. Lists in give a list in Wolfram's canonical order (shorter sublists first); sets in give a set. With no arguments the result is (Wolfram's
Union[]is the empty list). - Commutative and idempotent: , and argument order doesn't affect the result.
- Inclusion-exclusion: . See Intersection and Length.
- Sorted, matching Wolfram's Union — compute-engine's own de-duplication preserves first-seen order instead.
Examples
Scope #
Applications #
Properties #
About
| Examples | 18 |
|---|---|
| Checked against | Wolfram Language 16 agree1 differ |
| Crosswalk | WikipediaMathWorldWikidataBritannicaFungrimWolfram Language |
See also: Intersection, SetMinus