[swift-evolution] [Accepted and Focused Re-review] SE-0187: Introduce Sequence.filterMap(_:)
benjamin.garrigues at gmail.com
Thu Nov 16 05:43:17 CST 2017
I like mapAndUnwrap , but just for the record I'd like to add
I'm not a native english, but i think "and" doesn't convey as much meaning
relative to the order of the operation as "then".
As a sidenote, if we go this road I think flatMap should also be the object
of a renaming proposal. we would have
It doesn't look as functional style programming as flatMap and filterMap ,
but it's IMHO incredibly clearer. I remember being very puzzled by flatMap
the first time is discovered it and its type signature, making me think it
was "a different kind" of map, instead of a map plus something more in the
end of the process.
On Thu, Nov 16, 2017 at 11:23 AM, Jean-Daniel via swift-evolution <
swift-evolution at swift.org> wrote:
> Here's a variety of possible new names, in descending order of personal
> mapAndUnwrap // Thanks Nevin, this is surprisingly clear.
> mapSome // For these last three, it's unclear when nil elements
> are dropped. Before or after the map?
> An other explicit alternative
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution