59 lines
1.6 KiB
HTML
59 lines
1.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Originally converted to HTML using LaTeX2HTML 95 (Thu Jan 19 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE> and (MACRO)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value=" and (MACRO)">
|
|
<meta name="keywords" value="lp">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR>
|
|
<A HREF="node80.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A>
|
|
<A HREF="node72.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A>
|
|
<A HREF="node78.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <BR>
|
|
<A HREF="lp.html"><B>Contents</B></A>
|
|
<B> Next:</B>
|
|
<A HREF="node80.html"> append (FUNCTION)</A>
|
|
<B>Up:</B>
|
|
<A HREF="node72.html"> Appendix: Selected Lisp </A>
|
|
<B> Previous:</B>
|
|
<A HREF="node78.html"> <> , <=, </A>
|
|
<BR> <HR> <P>
|
|
<H1> and (MACRO)</H1>
|
|
<P>
|
|
<b> Format:</b>
|
|
<tt> (and <exp1> <exp2> ... <expN> )</tt>
|
|
<P>
|
|
<b> Required arguments:</b>
|
|
None
|
|
<P>
|
|
This macro evaluates its arguments in order until it reaches a nil value, in which case it returns NIL, or it returns the value of <tt> <expN> </tt>. Evaluation of intermediate expressions may produce side-effects. In the special case where and is given no arguments, it always returns T.
|
|
<P>
|
|
<b> Examples:</b>
|
|
<P>
|
|
<BLOCKQUOTE>
|
|
<PRE>> (and 3 (+ 4 5))
|
|
9
|
|
|
|
> (and nil (print 'hello))
|
|
NIL
|
|
|
|
> (and t (print 'hello) 3)
|
|
|
|
HELLO
|
|
3
|
|
|
|
> (and)
|
|
T
|
|
</PRE>
|
|
</BLOCKQUOTE>
|
|
<P>
|
|
<BR> <HR>
|
|
<P>
|
|
<ADDRESS>
|
|
<I>© Colin Allen & Maneesh Dhagat <BR>
|
|
March 2007 </I>
|
|
</ADDRESS>
|
|
</BODY>
|