Sequence

protocol Sequence

From here: https://stackoverflow.com/a/33553374/879365

This makes it easy to remove duplicates from an Array.

  • This is a primitive (old=fashioned) way to remove duplicates. It’s better to simply cast to a Set.

    Declaration

    Swift

    var uniqueElements: [Element] { get }