Combine - Single-valued publisher
While creating a custom operator out of Combine’s built-in ones in the Publisher extension is a useful (and quick!) technique to harmonize some common reactive behaviors, it is sometimes necessary...
Swift - @propertyWrapper with Publisher
Property wrappers are one of Swift’s major new features enabling us to attach some specific behavior each time a property gets accessed or mutated. It comes in very handy when...
Combine - Creating a custom subscriber
While Combine provides with a sink method that conveniently « creates the subscriber and immediately requests an unlimited number of values, prior to returning the subscriber. », the framework also enables us...
Swift - Leveraging the power of first-class functions
Functions, in Swift, are first-class citizens that can be passed as arguments, stored in properties or returned from functions. When dealing with Swift built-in functions such as map and forEach,...
Combine - share() and multicast()
Combine is designed around structs — which are value types — ensuring that a copy is made by the system whenever a resource is stored in a property (or passed...