[swift-evolution] [Review] SE-0187: Introduce Sequence.filterMap(_:)
BJ Homer
bjhomer at gmail.com
Fri Nov 10 09:37:12 CST 2017
> On Nov 10, 2017, at 5:07 AM, Tino Heth <2th at gmx.de> wrote:
>
> A: Well, it does a mapping, and then applies a filter to get rid of nils,
I prefer to think of it this way: it does a mapping, and keeps the results where the closure did not return nil. In the example given earlier, the closure returned Optional<Int?>.some(nil), which is not “nil”.
-BJ
More information about the swift-evolution
mailing list