And
Conjunction
And is the macro for conjunctions. And takes any number
of arguments. And returns nil if one of the arguments is nil,
but otherwise returns the last argument. If there are no arguments, and
returns t.
And is a Common Lisp macro. See any Common Lisp documentation for
more information.
Macro: and
(defmacro and (&rest args)
(and-macro args))
Function: and-macro
(defun and-macro (lst)
(declare (xargs :guard t))
(if (consp lst)
(if (consp (cdr lst))
(list 'if
(car lst)
(and-macro (cdr lst))
nil)
(car lst))
t))