lastOrNone

Returns the last element as Some(element), 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(element) matching the given predicate, or None if no such element was found.