Step into Swift logo

What is the Zip Operator in RxSwift?

Zip Operator

RxSwift: Zip Operator


  • Combines the emission of multiple Observables via a supplied function.
  • Emits a single element for each combination based on the results of the supplied function.
  • Function applied in strict order such that the first element emitted by the first Observable will be used with the first element emitted from the second Observable.
  • It will only emit as many times as the fewest emitting Observable.
  • Uses indexed sequencing.
  • If one Observable completes, the output Observable completes.
  • It does not wait until all the inner Observables are done.
  • Multiple variants just like combineLatest - one variant for collections.



< All Posts