46 lines
2.4 KiB
HTML
46 lines
2.4 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
||
|
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
||
|
<HEAD>
|
||
|
<TITLE>15. Lists</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<meta name="description" value=" Lists">
|
||
|
<meta name="keywords" value="clm">
|
||
|
<meta name="resource-type" value="document">
|
||
|
<meta name="distribution" value="global">
|
||
|
<P>
|
||
|
<b>Common Lisp the Language, 2nd Edition</b>
|
||
|
<BR> <HR><A NAME=tex2html3359 HREF="node148.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html3357 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html3351 HREF="node146.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html3361 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html3362 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html3360 HREF="node148.html"> Conses</A>
|
||
|
<B>Up:</B> <A NAME=tex2html3358 HREF="clm.html">Common Lisp the Language</A>
|
||
|
<B> Previous:</B> <A NAME=tex2html3352 HREF="node146.html"> Sorting and Merging</A>
|
||
|
<HR> <P>
|
||
|
<H1><A NAME=SECTION001900000000000000000>15. Lists</A></H1>
|
||
|
<P>
|
||
|
A <i>cons</i>, or dotted pair, is a compound data object having two components
|
||
|
called the <i>car</i> and <i>cdr</i>. Each component may be any Lisp object.
|
||
|
A <i>list</i> is a chain of conses
|
||
|
linked by <i>cdr</i> fields; the chain is terminated by some atom
|
||
|
(a non-cons object).
|
||
|
An ordinary list is terminated by <tt>nil</tt>, the empty list
|
||
|
(also written <tt>()</tt>).
|
||
|
A list whose <i>cdr</i> chain is terminated by some non-<tt>nil</tt> atom is called
|
||
|
a <i>dotted list</i>.
|
||
|
<P>
|
||
|
The recommended predicate for testing for the end of a list is <tt>endp</tt>.
|
||
|
<P>
|
||
|
<HR>
|
||
|
<UL>
|
||
|
<LI> <A NAME=tex2html3363 HREF="node148.html#SECTION001910000000000000000"> Conses</A>
|
||
|
<LI> <A NAME=tex2html3364 HREF="node149.html#SECTION001920000000000000000"> Lists</A>
|
||
|
<LI> <A NAME=tex2html3365 HREF="node150.html#SECTION001930000000000000000"> Alteration of List Structure</A>
|
||
|
<LI> <A NAME=tex2html3366 HREF="node151.html#SECTION001940000000000000000"> Substitution of Expressions</A>
|
||
|
<LI> <A NAME=tex2html3367 HREF="node152.html#SECTION001950000000000000000"> Using Lists as Sets</A>
|
||
|
<LI> <A NAME=tex2html3368 HREF="node153.html#SECTION001960000000000000000"> Association Lists</A>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<P><ADDRESS>
|
||
|
AI.Repository@cs.cmu.edu
|
||
|
</ADDRESS>
|
||
|
</BODY>
|