Owning AnyCancellable with Cancellor
Swift 5.4 officially introduces @resultBuilder, which is a way to create custom DSLs and generally create more semantic APIs (think of the way you write SwiftUI today). I wanted to play with it and create something useful for Combine developers so I thought “Would it not be handy to batch-add publisher subscriptions to an owned list of cancellables?”. I remembered back in the day I used an extension on NSObject that adds automatically a dispose bag to all objects in case you need one created by Ash Furrow and I thought I’d put together something in the same fashion. …