withLatestFrom

fun <T, U, R> Observable<T>.withLatestFrom(others: Iterable<Observable<U>>, mapper: (value: T, others: List<U>) -> R): Observable<R>

Combines the elements emitted by the source Observable with the latest emitted elements emitted by the others Observables. Elements are combined using the mapper function.

Please refer to the corresponding RxJava document.


fun <T, U, R> Observable<T>.withLatestFrom(other: Observable<U>, mapper: (T, U) -> R): Observable<R>

Combines the elements emitted by the source Observable with a latest emitted element emitted by the other Observable. Elements are combined using the mapper function.

Please refer to the corresponding RxJava document.


fun <T, T1, T2, R> Observable<T>.withLatestFrom(other1: Observable<T1>, other2: Observable<T2>, mapper: (value: T, other1: T1, other2: T2) -> R): Observable<R>

Combines the elements emitted by the source Observable with latest emitted elements emitted by other1 and other2 Observables. Elements are combined using the mapper function.

Please refer to the corresponding RxJava document.


fun <T, T1, T2, T3, R> Observable<T>.withLatestFrom(other1: Observable<T1>, other2: Observable<T2>, other3: Observable<T3>, mapper: (value: T, other1: T1, other2: T2, other3: T3) -> R): Observable<R>

Combines the elements emitted by the source Observable with latest emitted elements emitted by other1, other2 and other3 Observables. Elements are combined using the mapper function.

Please refer to the corresponding RxJava document.