last

fun last(): Int(source)

Returns the last element in the IntList or throws a NoSuchElementException if it isEmpty.


inline fun last(predicate: (element: Int) -> Boolean): Int(source)

Returns the last element in the IntList for which predicate returns true or throws NoSuchElementException if nothing matches.

See also