List

update_at/3

update_at(list, index, fun)

Returns a list where its index-th element is updated according ta function fun.

If index is out of bounds, the original list is returned.

Negative indices indicate an offset from the end of the list.