Synopsis The difference between two maps.
Syntax Exp1 - Exp2
Exp1 Exp2 Exp1 - Exp2
map[TK1, TV1] map[TK2, TV2] map[lub(TK1,TK2),lub(TK1,TK2)]
Description The result is the difference of the two map values of Exp1 and Exp2, i.e. a map with all pairs in Exp1 that do have a key that does not occur in Exp2.
rascal>("apple": 1, "pear": 2) - ("banana": 3, "apple": 4);
map[str, int]: ("pear":2)
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