Search code examples
rx-javarx-java2rx-kotlin

Rxkotlin - How to zip more than three observables with zip operator


I need to zip more than 3 observables with zip operator in rxkotlin, but when i try to zip more than 3 it shows me compile time error.
Example

 Observables.zip(Observable.just(someFun(0),Observable.just(someFun(1),Observable.just(someFun(2),Observable.just(someFun(3))

Is there we can zip more than 3 observable ?
Any help


Solution

  • Have you tried zipping more than three Observables? RxKotlin has a zip function up until six sources.
    So the answer is: yes, you can zip more than 3 observables.