SplitScript reference / [T] / removeAt

[T].removeAt

Method

[T].removeAt(index: u32) -> None

Removes the element at an index and shifts later elements left.

The array keeps its identity and capacity, so aliases observe the removal. An index greater than or equal to [T].length traps, matching indexed access. Stored references in the vacated final slot are released for garbage collection. Exact [T; N] arrays cannot change length and do not support removeAt.

Parameters

  • index: The zero-based index to remove.

Effects: mutates the receiver

Runtime behavior: available everywhere; synchronous

Examples

Consume the first pending checkpoint

let checkpoints: [u32] = [1, 2]
checkpoints.removeAt(0)