Navigation
Synopsis Map restricted to certain keys.
Function map[&K, &V] domainR(map[&K, &V] M, set[&K] S)
Usage import Map;
Description Return the map M restricted to pairs with key in S.
Examples
rascal>import Map;
ok
rascal>domainR(("apple": 1, "pear": 2, "orange": 3), {"apple", "pear"});
map[str, int]: ("pear":2,"apple":1)
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.