filterNot
Returns a sequence containing all elements not matching the given predicate.
fun <T> Sequence<T>.filterNot(predicate: (T) -> Boolean): Sequence<T>(source)
val numbers = listOf(1, 2, 3, 4, 5)
val oddNumbers = numbers.asSequence()
.filterNot { it % 2 == 0 }
.toList()
println(oddNumbers) // [1, 3, 5]