Navigation
Synopsis Membership test on set values.
Syntax Exp1 in Exp2
Types
Exp1 Exp2 Exp1 in Exp2
T1 <: T2 set[T2] bool
Description Yields true if the value of Exp1 occurs as element in the value of Exp2 and false otherwise. The type of Exp1 should be compatible with the element type of Exp2.
Examples
rascal>2 in {1, 2, 3};
bool: true
rascal>4 in {1, 2, 3};
bool: false

Questions
Question [1].
The type of false in [true, true, false, false] is

Question [2].
77 in {0,4,87,95,45,77} == 

Question [3].
9 in {8} == 



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.