remove(_:)
Removes the given element and any elements subsumed by the given element.
Declaration
@discardableResult mutating func remove(_ member: Self.Element) -> Self.Element?Parameters
- member:
The element of the set to remove.
Return Value
For ordinary sets, an element equal to member if member is contained in the set; otherwise, nil. In some cases, a returned element may be distinguishable from member by identity comparison or some other means.
For sets where the set type and element type are the same, like OptionSet types, this method returns any intersection between the set and [member], or nil if the intersection is empty.