next up previous
Contents Next: listp (PREDICATE) Up: Appendix: Selected Lisp Previous: let (SPECIAL FORM)

list (FUNCTION)

Format: (list <exp1> <exp2> ...<expN> )

Required arguments: none

Optional arguments: arbitrary

<exp1> ...<expN> : any sequence of zero or more Lisp expressions.

All the <arg> 's are evaluated and the resulting values are returned as elements of a list.

Examples:

> (list 'picard 'riker 'worf 'crusher)
(PICARD RIKER WORF CRUSHER)

> (list 'picard '(riker worf crusher))
(PICARD (RIKER WORF CRUSHER))

> (list 1 (+ 1 1) (+ 1 1 1) (+ 1 1 1 1))
(1 2 3 4)



© Colin Allen & Maneesh Dhagat
March 2007