You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structEquatableTypeHandler{letcanHandle:(Any,Any)->BoolletareEqual:(Any,Any)->Boolinit(
canHandle:@escaping(Any,Any)->Bool,
areEqual:@escaping(Any,Any)->Bool){self.canHandle =ClosureDecorator.decorate(canHandle){ closure, a, b inprint("🚨 Checking if can handle ")
// Perform more stuff
returnclosure(a, b)}self.areEqual =ClosureDecorator.decorate(canHandle){ closure, a, b inprint("🚨 Checking if are equal ")
// Perform more stuff
returnclosure(a, b)}}}
The text was updated successfully, but these errors were encountered:
New Packages
https://github.com/brunogama/ClosureDecorator
Closure Decorator
Just a experiment using swift parameter packs that wraps a closure with another closure.
Usage
Sample 1
Sample 2
The text was updated successfully, but these errors were encountered: