![]() |
| ||||||
Navigation |
Synopsis Membership test on list elements.
Syntax
Exp1 in Exp2
Types
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].
![]() ![]()
Question [2].
![]() ![]()
Question [3].
![]() ![]() ![]() |