https://kotlinlang.org logo
p

purereborn

09/21/2017, 11:42 PM
I guess in your case, the collector would produce a
Set<IntRange>
, for each new
IntRange
it'd check if there is an overlapping one that needs to be expanded, then you'd stream over the resulting Set and process each of the IntRange?