lastOrNone

Returns the last element as Some, or None if the iterable is empty.


inline fun <T> Iterable<T>.lastOrNone(predicate: (T) -> Boolean): Option<T>(source)

Returns the last element as Some matching the given predicate, or None if no such element was found.