The OpenD Programming Language

intersectionMap

template intersectionMap(alias merger)
intersectionMap
(
V
)

Members

Functions

intersectionMap
StringMap!V intersectionMap(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"], [3]);
intersectionMap!"a + b"(m0, m1).should == m2;

Meta