Contents

remove(at:)

Removes the element at the given index of the set.

Declaration

@discardableResult mutating func remove(at position: Set<Element>.Index) -> Element

Parameters

  • position:

    The index of the member to remove. position must be a valid index of the set, and must not be equal to the set’s end index.

Return Value

The element that was removed from the set.

See Also

Removing Elements