Yet another run at reduce
Brian Goetz
brian.goetz at oracle.com
Tue Jan 8 08:41:37 PST 2013
Yep. The "leftCombining" part is simply adapting a BiBlock to a BiFunction:
(t, u) -> { block.accept(t,u); return t; }
This particular rough edge is one that maybe we can file down.
On 1/8/2013 11:37 AM, Tim Peierls wrote:
> On Tue, Jan 8, 2013 at 11:18 AM, Brian Goetz <brian.goetz at oracle.com
> <mailto:brian.goetz at oracle.com>> wrote:
>
> Where intoCollection is a simple Reducer:
>
> Reducer<T,C> intoCollection(Supplier<C> collectionFactory) {
> return leftCombiningReducer(__collectionFactory,
> Collection::add, Collection::addAll);
> }
>
>
> And leftCombiningReducer builds a reducer out of its arguments, which
> correspond to makeResult, accumulate, and combine?
>
> --tim
More information about the lambda-libs-spec-observers
mailing list