Set in
rascal-0.40.17
Synopsis
Membership test on set values.
Syntax
Exp₁ in Exp₂
Types
Exp₁ | Exp₂ | Exp₁ in Exp₂ |
---|---|---|
T₁ <: T₂ | set[T₂] | bool |
Description
Yields true
if the value of Exp₁ occurs as element in the value of Exp₂ and false
otherwise. The type of Exp₁ should be compatible with the element type of Exp₂.
Examples
rascal>2 in {1, 2, 3};
bool: true
rascal>4 in {1, 2, 3};
bool: false