Next: Simplification
Up: Arithmetic of polynomials
Previous: Arithmetic of polynomials
- a list is an ordered set of elements (a 1 b ...)
- an element of a list can be a number, an identifier or another list,
e.g., (a (2))
- empty list ( )
- selection operations
- first returns the first element of a list: first[(a (2))] => a
- second returns the second element of a list: second[(a (2))] => (2)
- rest returns everything but the first element of a list:
rest[(a (2))] => ((2))
- constructive operations
- cons adds an element to the beginning of a list:
cons[1, (a b)] => (1 a b)
- list builds a list from its arguments: list[a, b] => (a b)
Richard Liska