How to deal with weak in closure in Swift
Issue #326
Traditionally, from Swift 4.2 we need guard let self
1 | addButton.didTouch = { [weak self] in |
This is cumbersome, we can invent a higher order function to zip and unwrap the optionals
1 | func with<A, B>(_ op1: A?, _ op2: B?, _ closure: (A, B) -> Void) { |