This is Understanding Combine, written by Matt Neuburg. Corrections and suggestions are greatly appreciated (you can comment here). So are donations; please consider keeping me going by funding this work at http://www.paypal.me/mattneub. Or buy my books: the current (and final) editions are iOS 15 Programming Fundamentals with Swift and Programming iOS 14. Thank you!


Partitioners

Partitioners
By partitioners, I mean operators that break off some subrange of the upstream values and emit those values. For example, the .first operator emits only the first value that arrives from upstream; the .output(at:n) operator emits only the nth value that arrives from upstream; and so on.

Like accumulators, some partitioners can emit a value only if the upstream sends a .finished completion. For example, the .last operator cannot know that it has received the last value from upstream until it also receives a .finished completion.


Table of Contents