remove(at:)
Removes and returns the element at the specified position.
@discardableResult mutating func remove(at position: Index) -> Element
Parameters
- position
The position of the element to remove.
position
must be a valid index of the collection that is not equal to the collection’s end index.
Returns
The removed element.