[swift-evolution] Spread Operator as Shorthand for Map

Matthew Johnson matthew at anandabits.com
Wed Dec 16 09:50:38 CST 2015


> 
> I’d like to write the following, but ‘make’ is a member, not a free function:
> cars.map(make)

If we peel off just the contextual shorthand aspect of this proposal you could write:

cars.map(.make)

That does seem like a big win if it is feasible (doesn’t introduce ambiguity or cause other significant challenges in implementation).  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151216/6ee908d7/attachment.html>


More information about the swift-evolution mailing list