Primitive streams (original) (raw)
Brian Goetz brian.goetz at oracle.com
Sat Dec 29 10:19:57 PST 2012
- Previous message: Primitive streams
- Next message: Primitive streams
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
So instead of stream.sumBy(IntMapper), we already have: stream.map(IntMapper).sum(). If the pipeline prefer to use fuzed operation, it's an implementation detail.
If we have IntStream, then yes this is most natural. The sumBy suggestion (Don's, I believe) was an alternative in the event we do not have IntStream; you can't define sum() on Stream but you can define sumBy(IntMapper) on Stream.
- Previous message: Primitive streams
- Next message: Primitive streams
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-experts mailing list