- Reactive Programming with Swift 4
- Navdeep Singh
- 62字
- 2025-04-04 17:21:12
Adding tuple destructuring
Consider code such as the following:
swift func foo(_: ((Int, Int) -> ()) {} foo { (x, y) in print(x + y) }
The migrator must add explicit tuple destructuring to continue building in Swift 4, such as shown here:
swift func foo(_: ((Int, Int) -> ()) {} foo { let (x, y) = $0; print(x + y) }