Dictionary
extension Dictionary
extension Dictionary where Value: Equatable
-
Assigns the value computed by
vtokifkis not already present in the dictionary.Declaration
Swift
@discardableResult public mutating func assignValueIfAbsent(forKey k: Key, _ v: @autoclosure () -> Value) -> Bool
-
Removes the key/value pairs in
selfthat are not also inother.Declaration
Swift
public mutating func formIntersection(_ other: `Self`) -
Returns a new dictionary containing the key/value pairs common to
selfandother.Declaration
Swift
public func intersection(_ other: `Self`) -> Dictionary<Key, Value>
View on GitHub