remove(at:)
Removes & returns the item at position
from the buffer
@discardableResult mutating func remove(at position: Index) -> Element
Parameters
- position
The index of the item to be removed from the buffer.
O(1) if the position is headIdx
or tailIdx
. otherwise O(n) where n is the number of elements between position
and tailIdx
.