Leave a rating/review
Now that you’ve learned what Combine is and how it will help you, it’s time to dive right in to one of the biggest parts of Combine: operators. Up until now you’ve subscribed to a publisher and taken whatever values it sends you unmodified and worked with them as is.
It turns out you can inject operators in between a publisher and subscribers, to manipulate those incoming values in one or more ways before handing them off to subscribers.
This means that operators are both Publishers and Subscribers.
Each operator receives values from an upstream publisher, performs its operation on those values, and then publishes them downstream, either to another operator or ultimately a subscriber.
In other words, operators can be chained, one after another, until you are able to manipulate the values to your exact liking for subscribers.
There are a multitude of operators in Combine. So it helps to organize them into categories based on their primary purposes, which is how you’ll learn them in the rest of the course.
First you’ll learn about transforming operators. You’ll use this kind of operator the most, to change the values coming in to something more useful to send downstream.
Next you’ll learn how to use filtering operators to restrict which values get through.
And by the end of this part of the course, you’ll be well-acquainted with a wide variety of operators in Combine, and you’ll be prepared to learm about even more operators later in the course. Let’s get started.