-
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
2.x: Should Maybe and Single have a corresponding Transformers? #4650
Labels
Comments
We have those kind of transformers but they are not wired up to |
Totally missed that they already existed. Done! - #4651 |
akarnokd
pushed a commit
that referenced
this issue
Oct 1, 2016
* Switch Maybe and Single to use their Transformers in compose() Resolves #4650 * Update compose() tests
Closing via #4651 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
Maybe.compose()
requires aFunction<? super Maybe<T>, ? extends MaybeSource<R>>
andSingle.compose()
requires something similarWhile other types have
FlowableTransformer
andCompletableTransformer
. Would it make sense to bring them into the same pattern? Aside from consistency, early testing for me shows that the generics gymnastics involved inMaybe
andSingle
'sFunction
approaches is a major headache, as any parameterized stream type gets lost and requires manual specification, forfeiting the ability to reuse APIs.Consider RxLifecycle, which historically has just returned an implementation of the required Transformer.
This works for simple unparameterized types, but breaks down when parameterized types come in.
Where
Confine.to
returns a bridging helper like this:FlowableTransformer
andCompletableTransformer
work fine, but the other two have been really tricky to nail down.The text was updated successfully, but these errors were encountered: