- Mastering macOS Programming
- Stuart Grimshaw
- 41字
- 2025-04-04 19:10:25
Nesting
We can nest a filter application within a flatmap application:
let results1 = collections.flatMap
{
intArray in intArray.filter { $0 <10 }
}
See if you can work out what type and value results1 will have, before running the code.