Introducing zip

The zip operator lets you combine sequences of different types and apply transformations to zip them together. It will combine up to eight Observable sequences into a single sequence and will wait to emit elements from each one of the other source Observable sequences at an index until they all have emitted elements at that index. The following diagram expresses the functionality of zip briefly:

If you are developing a card game and want to wait until each player was done with the full hand before continuing, you can use zip. Why do you think we need a zip operator for a card game?

Here's the answer—as some of you might have ...

Get Reactive Programming with Swift 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.