set

open operator override fun set(index: Int, element: E): E
operator fun set(index: PositiveInt, element: E): E
operator fun set(index: StrictlyPositiveInt, element: E): E

Replaces the element at the specified index in this list with the specified element, or throws an IndexOutOfBoundsException if the index is out of bounds.