Previous Up Next

6.39.10  Transforming sequences into lists and lists into sequences: [] nop op makesuite

To transform a sequence into list, you can put square brackets ([]) around the sequence. The makevector and nop commands have the same effect.


Example.
Input:

[seq(j^3,j=1..4)]

or:

[(j^3)$(j=1..4)]

or:

nop(j^3$(j=1..4))

or:

makevector(j^3$(j=1..4))

Output:


1,8,27,64


The makesuite command transforms a list into a sequence. Note that op (see Section 6.15.3) can do the same thing.


Example.
Input:

makesuite([0,1,2])

or:

op([0,1,2])

Output:

0,1,2

Previous Up Next