A .conj()

Read(384) Label: sequence, concatenate, new sequence,

Description:

Get concatenation of all sequence-type members in a sequence.

Syntax:

A.conj(x)

Note:

The function generates a new sequence by concatenating all the sequence-type members in sequence A; compute expression x by loop and then concatenate the results when parameter x is present.

Options:

@r

Recursively concatenate members until there isn’t any sequence members

Parameters:

A

A sequence whose members are sequences

x

An expression

Return value:

The new sequence by concatenating all the members in sequence A

Example:

 

A

 

1

=[[1,2,3],[4,5,6]].conj()

Result: [1,2,3,4,5,6]

2

=[[1,[2,3]],[2,5,6]].conj()

Result: [1,[2,3],2,5,6]

3

=[[1,2,3],[3],[7]].conj()

Result: [1,2,3,3,7]

4

=[[1,[2,3]],[2,5,6]].conj@r()

Use @r option to recursively concatenate members until there isn’t any sequence members ; the result is [1,2,3,2,5,6]

5

=demo.query("select EID,NAME,GENDER from EMPLOYEE where GENDER = 'M' and EID<15 order by NAME")

6

=demo.query("select EID,NAME,GENDER  from EMPLOYEE where GENDER = 'F' and EID<5 order by NAME")

7

=[A5,A6].conj(~.(NAME))

Return a sequence of NAME values in both A5 and A6

Related functions:

A.union()

A.diff()

A.isect()

A.xunion()