array_shrink(arr, n)
Reduce the size of the array arr to n. Raise an "Out of range" error if n is not in 0 ≤ n ≤ array_length(arr). Return void.
arr
n
0 ≤ n ≤ array_length(arr)
let a = #[10, 20, 30] array_shrink(a, 1) a // #[10]
Core Module Index | Contents