Hash.insert

Create a new hash with the passed in value set.

class Hash(K, V)
pure nothrow
insert
(
in K key
,
in V value
)

Return Value

Type: auto

New updated hash object with value inserted.

Examples

immutable data = ["foo": V(1)];
immutable subject = new immutable(Hash!(string, int))(data);
auto result = subject.insert("bar", 2);

Meta