Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Combine two dictionaries of same type with custom operator.
func += <Key, Value> (left: inout [Key: Value], right: [Key: Value]) {
for (key, value) in right {
left.updateValue(value, forKey: key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.