-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved scan, reduce, aggregate #257
Conversation
RxJava-pull-requests #120 SUCCESS |
RxJava-pull-requests #121 FAILURE |
RxJava-pull-requests #122 SUCCESS |
Thank you for working on this.
Rx.Net never used Java 8 is using the What names should we use and what aliases if any should we include in |
About And about the names to use: imho RxJava should have the Java 8 names as well as the orginial Rx.Net names. |
Agreed with your opinion on naming. Can you add those when you update the Observable and make sure the Javadocs of the methods are clear in linking to each other when they are aliases of each other? |
I've had a look at the Java 8 stream operations. To me, it looks like there's no explicit
So, I would just alias |
That works for me, we can always add more aliases if Java 8 adds a |
I plan on doing a release tomorrow (about 12 hours from now) if you want to try and have this ready for that. |
…reduce/scan overloads
RxJava-pull-requests #131 SUCCESS |
As soon as this is in, my |
Improved scan, reduce, aggregate
Improved scan, reduce, aggregate
scan
is currently restricted to accumulators of typeFunc2<T, T, T>
whereFunc2<R, T, R>
would be possible for initial values of typeR
. This pull request tries to fix this by generalizing thescan
implementation. I had to restructure the scan operator a bit for this to stay typesafe. Imho it's more readable now, though.This indirectly leads to generalized
reduce
, too.Also,
aggregate
is added as an alias forreduce
(see #20).