> On Aug 29, 2016, at 4:38 PM, Zhao Xin <[email protected]> wrote:
> ...
> _ = dict1.map {

I just use a `for` loop to iterate dict1, and inside it populate dict2. Using 
`map` here seems wasteful since it’s building an array that’s thrown away.

>     dict2.updateValue(value, forKey:key)

This is a tangent, but: Why do you use this syntax instead of the more readable 
`dict2[key] = value`? (I assume they’re equivalent internally.)

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

Reply via email to