One more pass on flatMap/mapMulti (original) (raw)
Tim Peierls tim at peierls.net
Thu Jan 10 08:01:06 PST 2013
- Previous message: One more pass on flatMap/mapMulti
- Next message: One more pass on flatMap/mapMulti
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
How about Acceptor?
On Thu, Jan 10, 2013 at 10:54 AM, Brian Goetz <brian.goetz at oracle.com>wrote:
Downstream:
/** A collector for values associated with a given input. Values can be * yielded individually, or in aggregates such as collections, arrays, or * streams; aggregates are flattened, so that yielding an array containing * [1, 2] is equivalent to yield(1); yield(2). */ interface Downstream { void yield(U element); default void yield(Collection collection) { for (U u : collection) yield(u); } default void yield(U[] array) { for (U u : array) yield(u); } default void yield(Stream stream) { stream.forEach(this::yield); } } The basic idea is that this is a collector for values. It was at one point called "collector" but now we have something else called Collector.
- Previous message: One more pass on flatMap/mapMulti
- Next message: One more pass on flatMap/mapMulti
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-observers mailing list