first

fun <T, D : Dimension> MultiArray<T, D>.first(): T

Returns first element.

Throws

if the collection is empty.


inline fun <T, D : Dimension> MultiArray<T, D>.first(predicate: (T) -> Boolean): T

Returns the first element matching the given predicate.

Throws

if no such element is found.