- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 69字
- 2021-07-02 23:54:26
The stride functions
stride functions enable us to iterate through ranges with a step other than one. There are two stride functions: the stride to function, which iterates over exclusive ranges, and stride through, which iterates over inclusive ranges. Consider the following example:
let fourToTwo = Array(stride(from: 4, to: 1, by: -1)) // [4, 3, 2]
let fourToOne = Array(stride(from:4, through: 1, by: -1)) // [4, 3, 2, 1]
推薦閱讀
- 同步:秩序如何從混沌中涌現(xiàn)
- Access 2007數(shù)據(jù)庫應(yīng)用上機(jī)指導(dǎo)與練習(xí)
- 深入淺出MySQL:數(shù)據(jù)庫開發(fā)、優(yōu)化與管理維護(hù)(第2版)
- Learning Proxmox VE
- 數(shù)據(jù)庫設(shè)計與應(yīng)用(SQL Server 2014)(第二版)
- 云數(shù)據(jù)中心網(wǎng)絡(luò)與SDN:技術(shù)架構(gòu)與實現(xiàn)
- 達(dá)夢數(shù)據(jù)庫運維實戰(zhàn)
- 重復(fù)數(shù)據(jù)刪除技術(shù):面向大數(shù)據(jù)管理的縮減技術(shù)
- Hadoop集群與安全
- R Object-oriented Programming
- openGauss數(shù)據(jù)庫核心技術(shù)
- ECharts數(shù)據(jù)可視化:入門、實戰(zhàn)與進(jìn)階
- 數(shù)據(jù)產(chǎn)品經(jīng)理寶典:大數(shù)據(jù)時代如何創(chuàng)造卓越產(chǎn)品
- SQL進(jìn)階教程(第2版)
- Configuration Management with Chef-Solo