- 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) }
推薦閱讀
- Data Visualization with D3 4.x Cookbook(Second Edition)
- Redis入門指南(第3版)
- Android Jetpack開發(fā):原理解析與應(yīng)用實(shí)戰(zhàn)
- MATLAB圖像處理超級(jí)學(xué)習(xí)手冊(cè)
- Cassandra Data Modeling and Analysis
- 游戲程序設(shè)計(jì)教程
- 鋒利的SQL(第2版)
- 精通MATLAB(第3版)
- 智能搜索和推薦系統(tǒng):原理、算法與應(yīng)用
- 打開Go語言之門:入門、實(shí)戰(zhàn)與進(jìn)階
- Mastering C++ Multithreading
- R語言:邁向大數(shù)據(jù)之路(加強(qiáng)版)
- Hadoop大數(shù)據(jù)分析技術(shù)
- 算法設(shè)計(jì)與分析:基于C++編程語言的描述
- Java程序設(shè)計(jì)教程