Skip to content

Instantly share code, notes, and snippets.

View evgeniyd's full-sized avatar
🌚

Yevhen Dubinin evgeniyd

🌚
View GitHub Profile
@evgeniyd
evgeniyd / UBIOperator.swift
Last active August 29, 2015 14:06
Override += operator to append a Dictionary with values and keys from another Dictionary
import Foundation
func += <KeyType, ValueType> (inout left: Dictionary<KeyType, ValueType>, right: Dictionary<KeyType, ValueType>) {
for (k, v) in right {
left.updateValue(v, forKey: k)
}
}