array_set(arr, i, v)
Assign the value v
to the i
th element of the array arr
, where
i >= 0 && i < array_length(arr)
. Raise an "argument" error
if arr
is not an array or i
is not a valid index. Return void
.
let xs = #[10, 20, 30]
array_set(xs, 1, 100)
xs
// #[10, 100, 30]