[swift-evolution] Changing the curried static methods

Stephen Celis stephen.celis at gmail.com
Sun Mar 13 12:30:46 CDT 2016


> On Mar 13, 2016, at 1:18 PM, Erica Sadun <erica at ericasadun.com> wrote:
> 
> Since removeFromSuperview doesn't take a UIView argument, it sounds like what you're looking for is
> something that acts like "apply", to apply a lambda/closure/selector/whatever to each member of a collection.
> 
> view.subviews.apply(UIView.removeFromSuperview)
> 
> -- E

This is what `forEach` currently does with the existing curried static syntax, right?

I was more interested in the implications of an example brought up in the OP:

    frames.map(CGRect.insetBy(-10, -10))

- Stephen


More information about the swift-evolution mailing list