I'd like to be able to do this:
func callSomething(callback: (test: (arg: Int = 4) -> Void) -> Void) {
callback(test: { print($0) })
}
callSomething { test in
test()
}
Ideally the default argument would be part of the closure's type signature.
If-not then it could be part of callSomething's signature, and it could
lose the defaulted arguments if passed around.
What do you think?
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution