``` fun <A,B: Any> Iterable<A>.firstNo...
# announcements
g
Copy code
fun <A,B: Any> Iterable<A>.firstNotNull(process: (A) -> B?) : B? {
    return this.asSequence().firstNotNull(process)
}

fun <A,B: Any> Sequence<A>.firstNotNull(process: (A) -> B?) : B? {
    return this.mapNotNull {
                process(it)
            }
            .firstOrNull()
}