1234567891011121314151617181920212223242526 |
- import Foundation
- extension Dictionary {
- static func += (_ lhs: inout Dictionary, _ rhs: Dictionary) {
- for (key, val) in rhs {
- lhs[key] = val
- }
- }
- static func + (_ lhs: Dictionary, _ rhs: Dictionary) -> Dictionary {
- var dict = lhs
- for (key, val) in rhs {
- dict[key] = val
- }
- return dict
- }
- }
|