Multiple traversals

Brian Goetz brian.goetz at
Fri Dec 20 18:06:06 PST 2013

> As I said in the original email I tend towards writing collectors,
> however they do force boxing (no Collector.ofDouble) and they are
> quite a lot of code to write.

If you start out with primitives, that's true.  But if you are 
projecting objects to primitives, the only boxing is for the final 
answer; everything else happens in the primitive domain.  See, for 
example, summarizingInt(T -> int); no matter how many elements or how 
many splits, there's only the one box operation for the final result.

More information about the lambda-dev mailing list