Previous Up Next

5.42.3  Intersection of two sets or of two lists: intersect

intersect is an infixed operator.
intersect takes as argument two sets or two lists.
intersect returns the intersection set of the arguments.
Input:

set[1,2,3,4] intersect set[5,6,3,4]

or:

%{1,2,3,4%} intersect %{5,6,3,4%}

Output:

3,4

Input:

[1,2,3,4] intersect [5,6,3,4]

Output:

3,4

Previous Up Next