Array

extension Array where Element : Equatable

Available where Element : Equatable

  • Appends element to self iff it is not already contained in self.

    Complexity

    O(n) where n is the length of self.

    Declaration

    Swift

    fileprivate mutating func appendUnlessContained(_ element: Element)