Keeps the first occurrence of each value, dropping later duplicates. Without a comparator, values are deduplicated by
identity the way a Set does (SameValueZero, so NaN collapses and -0 equals +0) in a single pass; pass
equal to compare by a custom relation instead, at the cost of a scan over the earlier values for each item.
Retains the unique values of an array.
Keeps the first occurrence of each value, dropping later duplicates. Without a comparator, values are deduplicated by identity the way a
Setdoes (SameValueZero, soNaNcollapses and-0equals+0) in a single pass; passequalto compare by a custom relation instead, at the cost of a scan over the earlier values for each item.