Set

extension Set
  • Removes all the elements that satisfy predicate from self.

    Declaration

    Swift

    public mutating func removeAll(where predicate: (Element) throws -> Bool) rethrows
  • Returns a set containing the elements in self and newElement.

    Declaration

    Swift

    public func inserting(_ newElement: Element) -> Set<Element>