Companion

object Companion

Functions

Link copied to clipboard
fun <E2> List<E2>.append(lastElement: E2): List<E2>

Produce a new immutable list based on the prefix List (which must not be modified after this operation) and the new element to follow them.

Link copied to clipboard
fun <E2> List<E2>.withoutLast(): List<E2>

Produce a new immutable list based on the given list, but with the last element excluded. Try to avoid creating new objects if possible.