popAt

fun popAt(index: Int): UInt

Removes and returns the element at the given index from this deque.

Example

val deque = dequeOf(1, 2, 3, 4, 5)
val value = deque.popAt(2)

value // 3
deque // Deque{1, 2, 4, 5}

Return

The value that was previously stored in this deque at the given index.

Parameters

index

Index of the item to remove from the deque and return.

Indexes are zero based.