I know there was more to what you were suggesting, but can I suggest removing 
the parentheses:

  let neg = [1, -2, 3].map{ -abs($0) }

  let ascii = words.flatMap{ $0.unicodeScalars.filter{ $0.isASCII } }


Patrick

> On 25 May 2016, at 5:46 AM, Marc Prud'hommeaux via swift-evolution 
> <[email protected]> wrote:
> 
> Everyone loves this syntax:
> 
>   let pos = [1, -2, 3].map(abs)
> 
> This syntax not so much:
> 
>   let neg = [1, -2, 3].map({ -abs($0) })

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to