Created
May 28, 2018 22:52
-
-
Save kiwiandroiddev/1dd18f6cefbe2d2b0fd944c80606d96a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T1, T2, R> asyncZip(source1: Single<T1>, | |
source2: Single<T2>, | |
zipper: (T1, T2) -> Single<R>): Single<R> = | |
Single.zip( | |
source1, source2, | |
io.reactivex.functions.BiFunction<T1, T2, Single<R>> { t1, t2 -> zipper(t1, t2) } | |
).flatMap { it } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment