The OpenD Programming Language

Array.removeAny

Removes the last element from the array and returns it. Both stable and non-stable versions behave the same and guarantee that ranges iterating over the array are never invalidated.

Precondition: empty == false

struct Array(T)
T
removeAny
()
if (
is(immutable T == immutable bool)
)

Return Value

Type: T

The element removed.

Complexity: O(1).

Throws

Exception if the array is empty.

Meta