The stream abstraction and substream() (original) (raw)

Jose jgetino at telefonica.net
Wed Apr 3 02:05:02 PDT 2013


Yes, parallel evaluation. What order should elements be reported to the consumer?

Agreed, in a parallel stream the order would be arbitrary.

But this is also the case of:

               forEach(Consumer<T>)	

In my view substream(long n, Consumer)

is just a forEach(), but limited to n elments. And this method could also be used to skip them, like in the current implementation.



More information about the lambda-dev mailing list