SelectMany or other useful operators from Rx (Ix)

Brian Goetz brian.goetz at oracle.com
Wed Jan 9 06:56:40 PST 2013


> For example, the SelectMany operator, which takes a stream of Ts, and for
> each T, a new stream of Us is produced, and at the end, these U streams are
> flattened into a single stream of Us:
>
> Stream<U> selectMany(Stream<T>, Function<T, Stream<U>>);

This is what we're currently calling mapMulti.

> I'm asking these because how default interface methods was chosen over C#
> style extension methods, where in the latter case I would just write a
> library for the operators and enjoy the dot-into simplicity. The former
> case leaves me (us) ask the owner of the particular interface for new
> default methods hopefully delivered in the next version, or stick with the
> static method call or wrapper-class approaches.

On the other hand, you got virtual extension methods instead of static.



More information about the lambda-dev mailing list