breandan
01/26/2021, 6:52 AMany
and all
? I need a way to short circuit a Flow if a value is ever found matching a predicate, similar to `anyMatch`/`allMatch`/`noneMatch` in the Java Streams API.firstOrNull { ... } != null
Mattias Flodin
01/26/2021, 7:35 AMbreandan
01/26/2021, 9:06 AMreduce
wouldn’t work since it doesn’t short circuit. I guess takeWhile
works, but it’s the same problem as firstOrNull
since I don’t need the values themselves, just the BooleanMattias Flodin
01/26/2021, 1:01 PM