Created
May 28, 2018 03:03
-
-
Save kiwiandroiddev/1f89c7936f6449956527c60f55e5c11f to your computer and use it in GitHub Desktop.
Async combine latest operator implementation for RxJava2 in Kotlin
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, T3, R> asyncCombineLatest(o1: Observable<T1>, | |
| o2: Observable<T2>, | |
| o3: Observable<T3>, | |
| asyncCombineFunc: (T1, T2, T3) -> Observable<R>): Observable<R> = | |
| Observable.combineLatest(o1, o2, o3, | |
| Function3<T1, T2, T3, Observable<R>> { t1, t2, t3 -> asyncCombineFunc(t1, t2, t3) } | |
| ).flatMap { it } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment