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

Tino holyzarquon at gmx.de
Fri Oct 27 06:21:26 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>>…)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171027/b19215c8/attachment.html>


More information about the swift-evolution mailing list