From the course: Learning Combine with Swift

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Manipulate data with operators

Manipulate data with operators - Swift Tutorial

From the course: Learning Combine with Swift

Start my 1-month free trial

Manipulate data with operators

- [Instructor] Apple provides you with pre built functions that extend the capabilities of your publishers helping you refine your logic and these are called operators. Operators play a central part of the combined ecosystem. They extend your publishers by allowing you to filter and manipulate values from an upstream publisher modifying the stream along the way to your subscribers. The modified stream your subscribers get via the operator is considered a new publishing stream. The real power of operators come in the fact that you can chain multiple operators together, maybe even for multiple publisher streams into a consolidated stream for your subscribers the way you want it. You would leverage operators to perform specific error handling perhaps buffer the rate at which your incoming stream is coming from or perhaps performing some prefetching logic. Say we have one publisher or two and they are emitting output streams for…

Contents