The OpenD Programming Language

unionMap

template unionMap(alias merger)
unionMap
(
V
)

Members

Functions

unionMap
StringMap!V unionMap(StringMap!V a, StringMap!V b)

Examples

import mir.test: should;
import mir.string_map : StringMap;
auto m0 = StringMap!int(["foo", "bar"], [1, 2]);
auto m1 = StringMap!int(["foo"], [2]);
auto m2 = StringMap!int(["foo", "bar"], [3, 2]);
unionMap!"a + b"(m0, m1).should == m2;

Meta