Dictionary

struct Dictionary<Key, Value> : Collection, ExpressibleByDictionaryLiteral where Key : Hashable
  • Adds elements of self to the passed-in dictionary and returns the result

  • Parameters:
  • dict: Dictionary to add
  • Returns

    Result of adding dict’s (key, value) pairs to self

    Declaration

    Swift

    public func add<Key: Hashable, Value>(_ dict: [Key: Value]) -> [Key: Value]

    Return Value

    Result of adding dict’s (key, value) pairs to self