Multiplication of sequences

Description:

Generate a new sequence by duplicating members of a sequence.

Syntax:

A*k   or

k*A

Note:

The function generates a new sequence by multiplying the given sequence by an integer k, that is - duplicating members of the sequence for k times.

If k<=0, then return an empty sequence.

Parameters:

A

A sequence

k

A positive integer

Return value:

A new sequence generated by duplicating the members of a given sequence for multiple times.

Example:

 

A

 

1

=[1,2,3]*3

[1,2,3, 1,2,3, 1,2,3]

2

=3*[1,2,3]

[1,2,3, 1,2,3, 1,2,3]

3

=[1,2,3]*0

[]

Related functions:

Difference between sequences

Union of sequences

Concatenation of sequences

Alignment arithmetic operations

cmp()

XOR-enabled sequence

Description:

Generate a new sequence by arranging distinct members (or single values) in two sequences.

Syntax:

A%B

Note:

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

Parameters:

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]

Related functions:

Difference between Sequences

Intersection of sequences

Union of Sequences

Alignment arithmetic operations

cmp()