View on GitHub

mini-swift

Minimal Flux architecture written in Swift.

EXTENSION

Dictionary

Methods

getOrPut(_:defaultValue:)

public mutating func getOrPut(_ key: Key, defaultValue: @autoclosure () -> Value) -> Value

Returns the value for the given key. If the key is not found in the map, calls the defaultValue function, puts its result into the map under the given key and returns it.

hasValue(for:)

public func hasValue(for key: Dictionary.Key) -> Bool

resolve(with:)

public func resolve(with other: [Key: Value]) -> Self

mergingNew(with:)

public func mergingNew(with other: [Key: Value]) -> Self

==(_:_:)

static func == (lhs: [Key: Value], rhs: [Key: Value]) -> Bool