array_set


array_set(arr, i, v)
      

Assign the value v to the ith 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.

Examples:


let xs = #[10, 20, 30]
array_set(xs, 1, 100)
xs
// #[10, 100, 30]
      

Also see:

array
array_ref_set
array_at


Core Module Index | Contents