Intersection of sequences

Read(2993) Label: sequences, common members, composed of,

Description:

Generate a new sequence composed of common members of two sequences.

Syntax:

A^B

Note:

The operation generates a new sequence composed of members of both A and B.

Parameter:

A

A sequence with a length of n

B

A sequence with a length of m

Return value:

A new sequence composed of two sequences’ common members  

Example:

 

A

 

1

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

[2,3].

2

=[1,2,3,3]^[1,3]

[1,3], there is only a 3 in the common members.

3

=[1,2,3,3]^[1,3,3]

[1,3,3], there are two 3s in the common members.

Related function:

Concatenation of sequences

Union of Sequences

Multiplication of sequence

Alignment Arithmetic Operations

cmp()