See also section 5.43.41.
A list can be defined by listing its elements, separated by commas,
between square brackets.
Input:
To define the empty list, simply enter the
brackets.
Input:
L0 is now the empty list.
The subsop command (see section 5.43.14) can be
used to modify lists. You can also redefine elements (or define new
elements) with :=.
Input:
Output:
Input:
then:
Output:
Input:
Output:
Input:
then:
Output:
You can also define a list with the makelist command.
Input:
creates a list with entries 4, from integers 1 to 3. This is the same
as [4 $ 3].
Output:
Input:
creates a list with entries 4, from integers 2 to 7. This is the same
as [4 $ 6].
Output:
Input:
creates a list of the squares of the numbers, starting at 1, ending at 10, and going in steps of 2. This is the same as [(k^2) $ (k = 1..10,2)]. Output: