toby
07/23/2018, 12:37 PMleolima
07/23/2018, 12:41 PM…
Function3 { a: Int, b: Int, c: String -> Triple(a, b, c) }
…
toby
07/23/2018, 12:47 PMarekolek
07/23/2018, 12:49 PMimport io.reactivex.functions.Function3
, it should workarekolek
07/23/2018, 12:49 PMTo help cope with the SAM ambiguity issue when using RxJava 2.x with Kotlin, there are a number of helper factories and extension functions to workaround the affected operators.
arekolek
07/23/2018, 12:50 PMObservables.zip(
Observable.just(test1),
Observable.just(test2),
Observable.just(test3)
) { a: Int, b: Int, c: String ->
Triple(a, b, c)
}
arekolek
07/23/2018, 12:52 PMObservables.zip(
Observable.just(test1),
Observable.just(test2),
Observable.just(test3)
)
since that emits a Triple
as welltoby
07/23/2018, 12:54 PMarekolek
07/23/2018, 1:02 PMObservables
, not Observable