lastOrElse

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

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