- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 49字
- 2021-07-02 23:54:27
The filter function
The filter function is a higher-order function that takes a function that, given an element in the array, returns Bool, indicating whether the element should be included in the resulting array. Consider the following example:
let evenNumbers = numbers.filter { $0 % 2 == 0 }
推薦閱讀
- 信息系統(tǒng)與數(shù)據(jù)科學(xué)
- 計(jì)算機(jī)信息技術(shù)基礎(chǔ)實(shí)驗(yàn)與習(xí)題
- Oracle RAC 11g實(shí)戰(zhàn)指南
- 大數(shù)據(jù):從概念到運(yùn)營(yíng)
- MySQL 8.x從入門到精通(視頻教學(xué)版)
- 金融商業(yè)算法建模:基于Python和SAS
- 大數(shù)據(jù)架構(gòu)商業(yè)之路:從業(yè)務(wù)需求到技術(shù)方案
- 云數(shù)據(jù)中心網(wǎng)絡(luò)與SDN:技術(shù)架構(gòu)與實(shí)現(xiàn)
- 重復(fù)數(shù)據(jù)刪除技術(shù):面向大數(shù)據(jù)管理的縮減技術(shù)
- 數(shù)據(jù)科學(xué)實(shí)戰(zhàn)指南
- Chef Essentials
- Spark分布式處理實(shí)戰(zhàn)
- 大數(shù)據(jù)數(shù)學(xué)基礎(chǔ)(R語言描述)
- Filecoin原理與實(shí)現(xiàn)
- 改進(jìn)的群智能算法及其應(yīng)用