firstOrNone

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


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

Returns the first element as Some matching the given predicate, or None if element was not found.