List Intersection
rascal-0.40.17
Synopsis
Intersection of two lists.
Syntax
Exp₁ & Exp₂
Types
//
Exp₁ | Exp₂ | Exp₁ & Exp₂ |
---|---|---|
list[T₁] | list[T₂] | list[lub(T₁,T₂)] |
Description
Returns the intersection of the two list values of Exp₁ and Exp₂, i.e., the list value of Exp₁ with all elements removed that do not occur in the list value of Exp₂.
Examples
rascal>[1, 2, 3, 4, 5] & [4, 5, 6];
list[int]: [4,5]