Previous Up Next

5.42.2  Union of two sets or of two lists: union

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

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

or:

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

Output:

1,2,3,4,5,6

Input:

[1,2,3] union [2,5,6]

Output:

1,2,3,5,6

Previous Up Next