I have iterator with a lot of items so I can’t convert it to Iterable for groupBy and don’t want to sotre all results in memmory.
But I know that all object are ordered by groupBy field so it seems possible to implement groupBy for sorted iterators… Is there already some method in scala collection to do this?
I have iterator with a lot of items so I can’t convert it to
Share
My solution: