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.
-
makevector (or nop) takes one argument:
S, a sequence.
- makevector(S) (or nop(S)) returns the
list with the same elements as S in the same order.
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:
The makesuite command transforms a list into a sequence.
Note that op (see Section 6.15.3) can do the same thing.
-
makesuite takes one argument:
L, a list.
- makesuite(L) returns the sequence with the same
elements as L and the same order.
Example.
Input:
makesuite([0,1,2])
or:
op([0,1,2])
Output: