- Mastering macOS Programming
- Stuart Grimshaw
- 32字
- 2025-04-04 19:10:25
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]]