List
Build a list
List is the macro for building a list of objects. For
example, (list 5 6 7) returns a list of length 3 whose elements are
5, 6, and 7 respectively. Also see list*.
List is defined in Common Lisp. See any Common Lisp documentation for
more information.
Macro: list
(defmacro list (&rest args)
(list-macro args))
Function: list-macro
(defun list-macro (lst)
(declare (xargs :guard t))
(if (consp lst)
(cons 'cons
(cons (car lst)
(cons (list-macro (cdr lst)) nil)))
nil))
Subtopics
- Hons-list
- (LIST ...) using HONS instead of CONS