moveElement

inline fun <E> Array<E>.moveElement(from: Int, to: Int)

Moves the given element from the from index to the to index.

Note: this method makes absolutely no attempt to verify if the given indices are valid.

Parameters

from

the index of the element to move

to

the index to move the element to