Instance Method

intersect(_:)

Removes from the receiving set each object that isn’t a member of another given set.

Declaration

func intersect(_ otherSet: Set<AnyHashable>)

Parameters

otherSet

The set with which to perform the intersection.

See Also

Combining and recombining sets

func union(Set<AnyHashable>)

Adds each object in another given set to the receiving set, if not present.

func minus(Set<AnyHashable>)

Removes each object in another given set from the receiving set, if present.

func setSet(Set<AnyHashable>)

Empties the receiving set, then adds each object contained in another given set.