moveUp

fun <T> MutableList<T>.moveUp(item: T): Boolean

Moves the given element T up the MutableList by an index increment unless it is at the top already which will result in no movement. Returns a Boolean indicating if move was successful


inline fun <T> MutableList<T>.moveUp(crossinline predicate: (T) -> Boolean): Boolean?

Moves first element T up an index that satisfies the given predicate, unless its already at the top