FilterNot

This is the inverted filter function:

val numbers = listOf(1, 2, 3, 4, 5)
val largerThan3 = numbers.filterNot { n -> n < 3 }

The resulting list has [4, 5].

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.123.106