Dictionary

public extension Dictionary
  • Declaration

    Swift

    subscript(key: Key, or def: Value) -> Value { mutating get set }

    Parameters

    key

    Key to retrieve from self.

    or

    Value that will be set for key if self[key] is nil.

    Return Value

    Value for key or or if key is not set.