Previous Up Next

2.37.1  Definition

A list (or a vector) is delimited by [ ], it’s elements must be separated by a comma. For example [1,2,5] is a list of three integers.

Lists can contain lists (for example, a matrice is a list of lists of the same size). Lists may be used to represent vectors (list of coordinates), matrices, univariate polynomials (list of coefficients by decreasing order).

Lists are different from sequences, because sequences are flat : an element of a sequence cannot be a sequence. Lists are different from sets, because for a list, the order is important and the same element can be repeted in a list (unlike in a set where each element is unique).

In Xcas answers :

The list elements are indexed starting from 0 in Xcas syntax mode and from 1 in all other syntax mode.


Previous Up Next