[swift-evolution] [draft] Introduce Sequence.filteredMap(_:)

Tino Heth 2th at gmx.de
Fri Oct 27 11:15:06 CDT 2017

> I wrote about this in 2015
> http://alejandromp.com/blog/2015/6/24/swift-flatmap/ <http://alejandromp.com/blog/2015/6/24/swift-flatmap/> and forgot about
> it.
That text has a line which illustrates the source of dissent:

> It’s kind of combining map (to apply the function), flatten (to unwrap the optionals) and filter (to remove the nils)

I’m saying this isn’t true, because after the flatten step, there are no Optionals left, and thus, there can be no nils at all (unless we startet with Optional<Optional<T>>…)

(hope this doesn’t arrive twice — imho Mail.app really should be retired for this kind of discussion ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171027/2805f3d0/attachment.html>

More information about the swift-evolution mailing list