- Reactive Programming with Swift 4
- Navdeep Singh
- 62字
- 2021-06-24 18:58:02
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) }
推薦閱讀
- Vue.js快速入門與深入實(shí)戰(zhàn)
- MongoDB for Java Developers
- NLTK基礎(chǔ)教程:用NLTK和Python庫構(gòu)建機(jī)器學(xué)習(xí)應(yīng)用
- Android 7編程入門經(jīng)典:使用Android Studio 2(第4版)
- Learning Python Design Patterns(Second Edition)
- Backbone.js Blueprints
- EPLAN實(shí)戰(zhàn)設(shè)計(jì)
- SQL基礎(chǔ)教程(視頻教學(xué)版)
- 精通網(wǎng)絡(luò)視頻核心開發(fā)技術(shù)
- Scientific Computing with Scala
- UML 基礎(chǔ)與 Rose 建模案例(第3版)
- AIRIOT物聯(lián)網(wǎng)平臺開發(fā)框架應(yīng)用與實(shí)戰(zhàn)
- HTML 5與CSS 3權(quán)威指南(第3版·上冊)
- .NET 4.5 Parallel Extensions Cookbook
- 代碼閱讀