append
type: function (subr) location: built-in source file: xllist.c Common LISP compatible: yes supported on: all machines
SYNTAX
(append [ <expr1> ... ] ) <exprN> - a list or list expression
DESCRIPTION
The APPEND function takes an arbitrary number of lists and splices them together into a single list. This single list is returned. If an empty list NIL is appended, it has no effect - it does not appear in the final list. (Remember that '(NIL) is not an empty list.) If an atom is is appended, it also has no effect and will not appear in the final list.
EXAMPLES
(append) ; returns NIL (append 'a 'b) ; returns B (append '(a) '(b)) ; returns (A B) (append 'a '(b)) ; returns (B) (append '(a) 'b) ; returns (A . B) (append '(a) nil) ; returns (A) (append (list 'a 'b) (list 'c 'd)) ; returns (A B C D) (append '(a (b)) '(c (d))) ; returns (A (B) C (D)) (append '(a) nil nil nil '(b)) ; returns (A B) (append '(a) '(nil) '(b)) ; returns (A NIL B)