firstOrElse

inline fun <T> Iterable<T>.firstOrElse(predicate: (T) -> Boolean, defaultValue: () -> T): T

Returns the first element matching the given predicate, or the result of calling the defaultValue function if no such element is found.