find
Returns the first element matching the given predicate, or null if no such element was found.
inline fun <T> Sequence<T>.find(predicate: (T) -> Boolean): T?(source)
val numbers = sequenceOf(1, 2, 3, 4, 5)
val firstGreaterThanThree = numbers.find { it > 3 }
println(firstGreaterThanThree) // 4