Transforming operators

Transforming operators are used when you want to model the data coming from a sequence to suit your requirements; in other words, prepare the data to match the requirements of a subscriber. For example, to transform elements emitted from an Observable sequence, you use the map operator; map will transform each element as it is emitted from the source Observable sequence. This is similar to the map(_:) method in the standard Swift library, except that this map works with Observable sequence elements. A marble diagram representation of the map operator will look like this:

We will go through an example of using map in ...

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.