From the course: Learning Combine with Swift

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Leverage the Combine advanced operators

Leverage the Combine advanced operators - Swift Tutorial

From the course: Learning Combine with Swift

Leverage the Combine advanced operators

- [Instructor] Before we let you go and explore the world of Combine, I'm going to dedicate a few minutes to go over some of the more advanced operators available in Combine. It won't be exhaustive, but it will give you a better taste of what else is out there to help you refine your pipelines. We're going to go through three categories of operators, separating, or filtering, aggregating, and demanding. In our exercise file, you can see we have a whole list of commented out operators. Go to line 21 and un-comment the line. So we have filter, click Play and Run. As you can see, we're now asked to get only the values which emit an array of integers that are divisible by two. As you can see, it requires the condition statement to equate to a boolean assertion. As its namesake suggests, filter lets you filter a downstream and republish based on certain conditions. This operator should be familiar to you as a Swift…

Contents