list_set


list_set(xs, i, v)
      

Assign the value v to the ith element of the list xs, where i >= 0 && i < length(xs). Raise an "argument" error if xs is not a list or i is not a valid index. Return modified tail of the list.

Examples:


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

Also see:

list
at


Core Module Index | Contents