Next: setadd
Prev: listlen
replace(list, position, data)This function returns the result of replacing the element of list numbered by position with data. If position is less than one or is greater than the length of list, then
replace() throws a ~range error.Examples:
replace([2, 3, 4], 2, 'foo)
=> [2, 'foo, 4]