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
November 1999