I would like to use default values for arguments of a lambda, such as:
func lambdaArgumentTest() -> String {
let lambda = { (optString: String = "") -> String in optString }
return lambda()
}
But the compiler seems to state that this is not possible:
Default argument is only permitted for a non-curried function parameter
Is there a good work around for this? Will that be possible in future versions?