Synopsis Membership test on the keys of a map.
Syntax Exp1 in Exp2
Exp1 Exp2 Exp1 in Exp2
T1 <: TK map[TK, TV] bool
Description Yields true if the value of Exp1 occurs as key in the map value of Exp2 and false otherwise. The type of Exp1 should be compatible with the key type TK of Exp2.
rascal>"pear" in ("apple": 1, "pear": 2);
bool: true
rascal>"pineapple" in ("apple": 1, "pear": 2);
bool: false
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