- Mastering macOS Programming
- Stuart Grimshaw
- 32字
- 2021-07-02 22:54:34
Nesting and chaining map, reduce, and filter
We can use multiple applications of map, reduce, and filter in a single statement. Take the following Array of [Int] objects:
let collections = [[5,12,17],[4,18],[9,11,3]]