Lists
Lists can be entered in Symja with curly braces {
and }
:
There are various functions for constructing lists:
The number of elements of a list can be determined with Length
:
Elements can be extracted using double square braces:
Negative indices count from the end:
Lists can be nested:
There are various ways of extracting elements from a list:
Lists can be used to assign values to multiple variables at once:
Many operations, like addition and multiplication, “thread” over lists, i.e. lists are combined element-wise:
It is an error to combine lists with unequal lengths: