After reading your book (v0.3), I felt inspired to use Combine in some of my newer projects. Fast forward some weeks and I have written several custom publishers/operators/subscribers.
Since at the time I struggled finding working examples for custom publishers, I have decided to gather some of them in a Github repo in case it is helpful to someone.
Cheers and keep up the great work. I can wait to read the last chapters.
Feedback like this really brightens my day, thank you for taking the time to write us! That repo looks really useful and shared it onwards to the https://combine.community slack and twitter. The final version of the books should arrive within days with the rest of the chapters
There are now custom subscribers on the repo using backpressure, which I find myself using more and more (e.g. it is quite an interesting tool to control the amount of in-flight API calls).
Also I have added some interesting operators/publishers such as:
retry on error and wait a given amount of seconds between attempts.
handleEnd to execute a side-effect (exactly once) for any kind of completion (whether successful completion, failure, or cancel) so you can always clean up state.
upstream.handleEnd { /* clean up */ }
Once one creates some custom publishers/subscribers, it is quite surprising how mechanical (and fast) the creation can be if you distill the core competences. I have extracted the basic states of any Combine entity on a property wrapper that can be easily used if you decide to create your own custom Combine publishers or subscribers.