Why not use `.takeIf { ... }` and `.takeWhile { .....
# announcements
v
Why not use
.takeIf { ... }
and
.takeWhile { ... }
? E.g.
.filter { it.rem(2) == 0 }.takeWhile { it <= 80 }
- this will output all even numbers up to 80 inclusively