updateAt

inline fun <T> MutableList<T>.updateAt(index: Int, transform: (T) -> T)

Replaces the element at index with the result of applying transform to it.

Throws

if index is not a valid index.