aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2000-01-01 07:14:57 +0000
committerRichard M. Stallman2000-01-01 07:14:57 +0000
commit3998eed0c79c6b68e94e8739fa1f1e08e8f09a69 (patch)
tree0fc9c1ed8a1f43fd390fc0c510587338396d3bfe
parent9b784e967651d58d80914c83f254ecd33a10682d (diff)
downloademacs-3998eed0c79c6b68e94e8739fa1f1e08e8f09a69.tar.gz
emacs-3998eed0c79c6b68e94e8739fa1f1e08e8f09a69.zip
*** empty log message ***
-rw-r--r--lispref/lists.texi26
1 files changed, 15 insertions, 11 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi
index 58b1cfe4de8..4133114c3ea 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -32,17 +32,21 @@ the whole list.
32 32
33 Lists in Lisp are not a primitive data type; they are built up from 33 Lists in Lisp are not a primitive data type; they are built up from
34@dfn{cons cells}. A cons cell is a data object that represents an 34@dfn{cons cells}. A cons cell is a data object that represents an
35ordered pair. It holds, or ``refers to,'' two Lisp objects, one labeled 35ordered pair. That is, it has two slots, and each slot @dfn{holds}, or
36as the @sc{car}, and the other labeled as the @sc{cdr}. These names are 36@dfn{refers to}, some Lisp object. One slot is known as the @sc{car},
37traditional; see @ref{Cons Cell Type}. @sc{cdr} is pronounced 37and the other is known as the @sc{cdr}. (These names are traditional;
38``could-er.'' 38see @ref{Cons Cell Type}.) @sc{cdr} is pronounced ``could-er.''
39 39
40 A list is a series of cons cells chained together, one cons cell per 40 We say that ``the @sc{car} of this cons cell is'' whatever object
41element of the list. By convention, the @sc{car}s of the cons cells are 41its @sc{car} slot currently holds, and likewise for the @sc{cdr}.
42the elements of the list, and the @sc{cdr}s are used to chain the list: 42
43the @sc{cdr} of each cons cell is the following cons cell. The @sc{cdr} 43 A list is a series of cons cells ``chained together,'' so that each
44of the last cons cell is @code{nil}. This asymmetry between the 44cell refers to the next one. There one cons cell for each element of
45@sc{car} and the @sc{cdr} is entirely a matter of convention; at the 45the list. By convention, the @sc{car}s of the cons cells hold the
46elements of the list, and the @sc{cdr}s are used to chain the list: the
47@sc{cdr} slot of each cons cell refers to the following cons cell. The
48@sc{cdr} of the last cons cell is @code{nil}. This asymmetry between
49the @sc{car} and the @sc{cdr} is entirely a matter of convention; at the
46level of cons cells, the @sc{car} and @sc{cdr} slots have the same 50level of cons cells, the @sc{car} and @sc{cdr} slots have the same
47characteristics. 51characteristics.
48 52