List

insert_at/3

insert_at(list, index, value)

Returns a list with value inserted at the specified index. Note that index is capped at the list length.

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