Concatenation of sequences

Read(2000) Label: sequences, concatenate,

Description:

Concatenate two sequences to generate a new sequence.

Syntax:

A|B

A|x

x|A

Note:

The operation oncatenates the members of two sequences(or single values) in their original order to compose a new sequence, that is, [A(1),…,A(n),B(1),…,B(m)].

Parameter:

A

A sequence whose length is n, or a single value, which can be regarded as [A]

B

A sequence whose length is m, or a single value, which can be regarded as [B]

Return value:

Sequence

Example:

 

A

 

1

=[1,2]|[1,2,3,"a"]

[1,2,1,2,3,a]; the same member appears repeatedly.

2

=1|2|"a"

[1,2,a]; the single values can also be concatenated.

3

=2|[3,"b"]

[2,3,b].

4

=[3,"b"]|2

[3,b,2].

Related function:

Difference between sequences

Intersection of sequences

Union of sequences

Multiplication of sequences

Alignment Arithmetic Operations

cmp()