Avatar
class Escaper { func take(_ f: @escaping () -> Void) {} } class Cat { var a: Optional<(@escaping () -> Void) -> Int> func f(escaper: Escaper) { a = { (handler: @escaping () -> Void) -> Int in escaper.take(handler) return 0 } } } (edited)