### 6.1.10 Transforming sequences into lists and lists into sequences

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 S, a sequence.
- makevector(S) (or nop(S)) returns the list with the same elements as S in the same order.

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

- makesuite takes L, a list.
- makesuite(L) returns the sequence with the same elements as L and the same order.

#### Examples

[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))

| ⎡ ⎣ | 1,8,27,64 | ⎤ ⎦

makesuite([0,1,2])

or:

op([0,1,2])

0,1,2 |  |  |  |  |  |  |  |  |  |