Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.92 KB

Unique.md

File metadata and controls

59 lines (42 loc) · 1.92 KB

Unique

[Source | Tests]

Methods to strip repeated elements from a sequence or collection.

The uniqued() method returns a sequence, dropping duplicate elements from a sequence. The uniqued(on:) method does the same, using the result of the given closure to determine the "uniqueness" of each element.

let numbers = [1, 2, 3, 3, 2, 3, 3, 2,