- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 66字
- 2021-07-02 23:54:24
Tuples
Swift provides tuples so that they can be used to group multiple values/types into a single compound value. Consider the following example:
let http400Error = (400, "Bad Request")
// http400Error is of type (Int, String), and equals (400, "Bad Request")
// Decompose a Tuple's content
let (requestStatusCode, requestStatusMessage) = http400Error
Tuples can be used as return types in functions to implement multi-return functions as well.
推薦閱讀
- 我們都是數(shù)據(jù)控:用大數(shù)據(jù)改變商業(yè)、生活和思維方式
- Modern Programming: Object Oriented Programming and Best Practices
- 從0到1:數(shù)據(jù)分析師養(yǎng)成寶典
- iOS and OS X Network Programming Cookbook
- UDK iOS Game Development Beginner's Guide
- Ceph源碼分析
- 達(dá)夢(mèng)數(shù)據(jù)庫(kù)性能優(yōu)化
- 數(shù)據(jù)庫(kù)程序員面試筆試真題庫(kù)
- 大數(shù)據(jù)技術(shù)入門(mén)
- SQL應(yīng)用及誤區(qū)分析
- 高維數(shù)據(jù)分析預(yù)處理技術(shù)
- IPython Interactive Computing and Visualization Cookbook(Second Edition)
- 一本書(shū)講透Elasticsearch:原理、進(jìn)階與工程實(shí)踐
- 探索新型智庫(kù)發(fā)展之路:藍(lán)迪國(guó)際智庫(kù)報(bào)告·2015(上冊(cè))
- Augmented Reality using Appcelerator Titanium Starter