-
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
Compose/Transformer #1416
Comments
How is that different from |
This would not use |
Yes, that's what I imagined. Could we call it |
I'd have to play with Groovy and Clojure to see. We'd likely want another type like |
Discussing with @headinthebox the more appropriate name for this is public <R> Observable<R> compose(Func1<? super Observable<T>,? extends Observable<R>> function) With the cover type: public <R> Observable<R> compose(Transformer<T, R> function)
public interface Transformer<T, R> extends Func1<? super Observable<? super T>,? extends Observable<? extends R>>; NOTE: Not sure about the co/contra-variance in that signature. |
See ReactiveX#1416 for discussion that led to this. This does not have co/contra-variance which needs to be figured out.
Failing test while exploring generic variance for ReactiveX#1416
I added If super/extends doesn't work for it, then maybe we should change /cc @headinthebox |
Failing test while exploring generic variance for ReactiveX#1416
Thanks @abersnaze for the fix to variance. Closing this. |
Should we add a
chain
method, similar tolift
but that takes a function fromObservable<T>
toObservable<R>
?This carries on the conversation from #983. A summary can be found at #983 (comment).
Signature:
Usage:
This would emit
0,1,2,3,100
.Similar to
lift
, do we need a cover type on this as well to handle generics? Right now the T and R are not markedsuper
and I think they need to be.The text was updated successfully, but these errors were encountered: