Skip to content
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: concatWith/mergeWith Completable for Single and Maybe #6094

Closed
arekolek opened this issue Jul 18, 2018 · 1 comment
Closed

2.x: concatWith/mergeWith Completable for Single and Maybe #6094

arekolek opened this issue Jul 18, 2018 · 1 comment

Comments

@arekolek
Copy link

Similar in vein to #5350, is there place in this library for methods that would void the need for extension functions like those four?

fun <T> Single<T>.concatWith(completable: Completable): Single<T> {
    return toObservable().concatWith(completable).singleOrError()
}

fun <T> Single<T>.mergeWith(completable: Completable): Single<T> {
    return toObservable().mergeWith(completable).singleOrError()
}

fun <T> Maybe<T>.concatWith(completable: Completable): Maybe<T> {
    return toObservable().concatWith(completable).singleElement()
}

fun <T> Maybe<T>.mergeWith(completable: Completable): Maybe<T> {
    return toObservable().mergeWith(completable).singleElement()
}
@arekolek arekolek changed the title concatWith/mergeWith Completable for Single and Maybe 2.x: concatWith/mergeWith Completable for Single and Maybe Jul 18, 2018
@akarnokd
Copy link
Member

With Kotlin, you can have all sorts of extension methods yourself, there is no need to have them in RxJava itself. I don't think these paeticular convenience methods are worth it. You may try RxKotlin though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants