- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 82字
- 2021-07-02 23:54:26
while loops
Swift provides while and repeat-while loops. A while or repeat-while loop performs a set of expressions until a condition becomes false. Consider the following example:
var n = 2
while n < 100 {
n = n * 2
}
var m = 2
repeat {
m = m * 2
} while m < 100
The while loop evaluates its condition at the beginning of each iteration. The repeat-while loop evaluates its condition at the end of each iteration.
推薦閱讀
- 數(shù)據(jù)可視化:從小白到數(shù)據(jù)工程師的成長之路
- SQL Server入門經(jīng)典
- 數(shù)據(jù)要素五論:信息、權(quán)屬、價(jià)值、安全、交易
- Hadoop大數(shù)據(jù)實(shí)戰(zhàn)權(quán)威指南(第2版)
- Python醫(yī)學(xué)數(shù)據(jù)分析入門
- 數(shù)據(jù)革命:大數(shù)據(jù)價(jià)值實(shí)現(xiàn)方法、技術(shù)與案例
- 數(shù)據(jù)庫技術(shù)及應(yīng)用教程
- 數(shù)據(jù)庫原理與設(shè)計(jì)(第2版)
- 金融商業(yè)算法建模:基于Python和SAS
- PostgreSQL指南:內(nèi)幕探索
- 計(jì)算機(jī)組裝與維護(hù)(微課版)
- 大數(shù)據(jù)技術(shù)原理與應(yīng)用:概念、存儲、處理、分析與應(yīng)用
- 大數(shù)據(jù)分析:R基礎(chǔ)及應(yīng)用
- 數(shù)據(jù)庫原理與設(shè)計(jì)實(shí)驗(yàn)教程(MySQL版)
- 數(shù)據(jù)挖掘與數(shù)據(jù)化運(yùn)營實(shí)戰(zhàn):思路、方法、技巧與應(yīng)用