set

operator fun set(index: Int, element: T): T

Replaces the element at the specified position in this list with the specified element.

Return

the element previously at the specified position

Parameters

index

index of the element to replace

element

element to be stored at the specified position