first

fun first(): Int(source)

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


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

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

See also