addFirst

expect fun <T> MutableList<T>.addFirst(item: T)

Inserts item at the head of this list, shifting all other elements one position towards the tail. Named after (and, on platforms with one, backed by) the "add first" operation of a proper deque.


expect fun <T> MutableList<T>.addFirst(items: Iterable<T>)
expect fun <T> MutableList<T>.addFirst(items: Sequence<T>)

Inserts all the elements of items, in iteration order, at the head of this list.

actual fun <T> MutableList<T>.addFirst(item: T)

Inserts item at the head of this list, shifting all other elements one position towards the tail. Named after (and, on platforms with one, backed by) the "add first" operation of a proper deque.


actual fun <T> MutableList<T>.addFirst(items: Iterable<T>)
actual fun <T> MutableList<T>.addFirst(items: Sequence<T>)

Inserts all the elements of items, in iteration order, at the head of this list.

actual fun <T> MutableList<T>.addFirst(item: T)

Inserts item at the head of this list, shifting all other elements one position towards the tail. Named after (and, on platforms with one, backed by) the "add first" operation of a proper deque.


actual fun <T> MutableList<T>.addFirst(items: Iterable<T>)
actual fun <T> MutableList<T>.addFirst(items: Sequence<T>)

Inserts all the elements of items, in iteration order, at the head of this list.