XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

list


Type:   -   function (subr)
Source:   -   xllist.c

Syntax

(list [expr1 ... ])
exprN - an expression
returns - the new list

Description

The 'list' function takes the expressions and constructs a list out of them. This constructed list is returned.

Examples

(list)                           ; returns NIL
(list nil)                       ; returns (NIL)
(list 'a)                        ; returns (A)
(list 'a 'b)                     ; returns (A B)
(list 'a 'b 'c)                  ; returns (A B C)
(list 'a 'b nil)                 ; returns (A B NIL)
(list '(a b) '(c d) '( (e f) ))  ; returns ((A B) (C D) ((E F)))
(list (+ 1 2) (+ 3 4))           ; returns (3 7)

See the list function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next