Unique
The elements of a collection, each kept once, in first-occurrence order.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
DeleteDuplicates✓Unique(xs) with every repeat of an element dropped, keeping the first occurrence.Unique(xs, test)as above, but two elements count as duplicates when holds for them, not just when they're structurally equal.Typed signatures
| Type | Package | Applies |
|---|---|---|
((T) -> T where T: string) & ((collection<T>) -> list<T> where T: any) | compute-engine | always |
(collection<any>, function?) -> list<any> | combinatoricsreplaces compute-engine | always |
Examples
Scope #
live ↗
InOut
A second argument says when two elements count as duplicates -- here, when they differ by less than 2
live ↗InOut
Applications #
About
| Examples | 12 |
|---|---|
| Checked against | Wolfram Language 12 agree |
| Crosswalk | Wolfram Language |