[swift-evolution] [pitch] Adding in-place removeAll to the std lib

Guillaume Lessard glessard at tffenterprises.com
Tue Apr 11 12:13:35 CDT 2017


> On Apr 10, 2017, at 13:30, Kevin Nattinger via swift-evolution <swift-evolution at swift.org> wrote:
> 
> array.remove(where: { $0 > 3 })
> array.remove { $0 > 3 }

`where` is the best label for this.

`filter` doesn’t have an overload for Comparable, this doesn’t need one either.

Cheers,
Guillaume Lessard



More information about the swift-evolution mailing list