[swift-evolution] Tuple
Fabian Ehrentraud
Fabian.Ehrentraud at willhaben.at
Thu Jul 21 04:33:45 CDT 2016
>
> It's error by design: we don't allow tuple unpacking in closure parameters. Another example:
>
> func call(block: ((Int, Int)) -> Int) // note double parens
> call { (a, b) in print(a + b) } // will be error
> call { (a) in print(a.0 + a.1) } // ok
Is there a reason for this design, or would it be possible / make sense to support this?
F
More information about the swift-evolution
mailing list