move

fun <T> MutableList<T>.move(fromIndex: Int, toIndex: Int)

Moves the element at fromIndex so that it sits at toIndex, shifting the elements between them.

Throws

if fromIndex or toIndex is not a valid index of this list.