> This is a wonderful example! But it’s an argument for a different discussion
> (of general usefulness of implicit optional promotion). Thanks to the
> optional promotion, what the closure returns is not nil, but instead is
> .some(nil), and that is not filtered out.
My point is: The proposed filterMap isn’t a combination of map and filter at
all — or can you build it just out of map & filter, like flatMap is constructed
from map & flatten?
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution