SelectMany or other useful operators from Rx (Ix)

Dávid Karnok akarnokd at gmail.com
Wed Jan 9 05:32:00 PST 2013


Hello,

My apologies if this was asked before.

You might be aware of the recently open-sourced Reactive and Interactive
Extensions C# library, which features many of the operators of the new Java
8 Stream API (under different naming).

Is it worth taking a few operator ideas from this library?

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>>);


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.

Best regards,
David Karnok


More information about the lambda-dev mailing list