union(set)/bitOr(|)

Syntax

Set Operation: X | Y or X union Y or union(X,Y)

Bit Operation: X | Y or X bitOr Y or bitOr(X, Y)

Arguments

Set Operation: X and Y are sets.

Bit Operation: X and Y are equal sized vectors,or Y is a scalar.

Details

Set Operation: X and Y are sets.

Bit Operation: X and Y are equal sized vectors, or Y is a scalar.

Examples

//Union of sets:
$ x=set([5,5,3,4]);
$ y=set(8 9 9 4 6);
$ x | y;
set(8,9,6,4,3,5)

// Bit Operation:
$ x=1 0 1;
$ y=0 1 1;
$ x|y;
[1,1,1]