### 4.9.2 list expressions

A list expression is:

1. the empty list `list()`
2. an identifier of type list
3. a function returning list
4. list expressions combined by the arithmetic operation `+`
5. a type cast to list

See Type conversion and casting.

Example:

      list l = "hello",1;
      l;
    ==> [1]:
    ==>    hello
    ==> [2]:
    ==>    1
      l = list();
      l;
    ==> empty list
      ring r =0,x,dp;
      factorize((x+1)^2);
    ==> [1]:
    ==>    _[1]=1
    ==>    _[2]=x+1
    ==> [2]:
    ==>    1,2
      list(1,2,3);
    ==> [1]:
    ==>    1
    ==> [2]:
    ==>    2
    ==> [3]:
    ==>    3

User manual for Singular version 4-0-3, 2016, generated by texi2html.