filter

Common
JVM
JS
Native
1.0
fun <T> Sequence<T>.filter(
    predicate: (T) -> Boolean
): Sequence<T>

Returns a sequence containing only elements matching the given predicate.

The operation is intermediate and stateless.