lastOrNull

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

Returns the last element, or null if the list is empty.


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

Returns the last element matching the given predicate, or null if no such element was found.