XOR-enabled sequence

Read(473) Label: distinct, member, new sequence,

Description:

Generate a new sequence by combining distinct members  of two sequences in order.

Syntax:

A%B

A%x

x%A

Note:

The operator enables a new sequence by combining distinct members (or single values) in sequence A and sequence B. Won’t repeat distinct operation over same members.

Parameter:

A

An integer sequence

B

A sequence or a single value; treated as sequence [B] when it is a value

Return value:

A sequence

Example:

 

A

 

1

=[1,2,3,4]%[2,3]

[1,4]

2

=[1,2,3,3]%[1,3]

[2,3]; won’t repeat distinct operation over same members.

3

=[1,2,3]%3

[1,2]

4

=[1,2,3,3,4]%[1,1,3]

[2,3,4,1]

5

=3%[1,2,3]

[1,2]

Related function:

Difference between Sequences

Intersection of sequences

Union of Sequences

Alignment arithmetic operations

cmp()