Mastering macOS Programming
上QQ阅读APP看书,第一时间看更新

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.