comparison lispref/lists.texi @ 77006:1f4b88ab053d

Improve index entries. Remove redundant/useless ones.
author Richard M. Stallman <rms@gnu.org>
date Sat, 07 Apr 2007 02:06:21 +0000
parents 1eb21d4498cf
children 1c6131b3845b 4ef881a120fe
comparison
equal deleted inserted replaced
77005:2122b5496349 77006:1f4b88ab053d
4 @c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4 @c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 @c See the file elisp.texi for copying conditions. 5 @c See the file elisp.texi for copying conditions.
6 @setfilename ../info/lists 6 @setfilename ../info/lists
7 @node Lists, Sequences Arrays Vectors, Strings and Characters, Top 7 @node Lists, Sequences Arrays Vectors, Strings and Characters, Top
8 @chapter Lists 8 @chapter Lists
9 @cindex list 9 @cindex lists
10 @cindex element (of list) 10 @cindex element (of list)
11 11
12 A @dfn{list} represents a sequence of zero or more elements (which may 12 A @dfn{list} represents a sequence of zero or more elements (which may
13 be any Lisp objects). The important difference between lists and 13 be any Lisp objects). The important difference between lists and
14 vectors is that two or more lists can share part of their structure; in 14 vectors is that two or more lists can share part of their structure; in
28 @end menu 28 @end menu
29 29
30 @node Cons Cells 30 @node Cons Cells
31 @section Lists and Cons Cells 31 @section Lists and Cons Cells
32 @cindex lists and cons cells 32 @cindex lists and cons cells
33 @cindex @code{nil} and lists
34 33
35 Lists in Lisp are not a primitive data type; they are built up from 34 Lists in Lisp are not a primitive data type; they are built up from
36 @dfn{cons cells}. A cons cell is a data object that represents an 35 @dfn{cons cells}. A cons cell is a data object that represents an
37 ordered pair. That is, it has two slots, and each slot @dfn{holds}, or 36 ordered pair. That is, it has two slots, and each slot @dfn{holds}, or
38 @dfn{refers to}, some Lisp object. One slot is known as the @sc{car}, 37 @dfn{refers to}, some Lisp object. One slot is known as the @sc{car},
102 This function returns @code{t} if @var{object} is a cons cell, @code{nil} 101 This function returns @code{t} if @var{object} is a cons cell, @code{nil}
103 otherwise. @code{nil} is not a cons cell, although it @emph{is} a list. 102 otherwise. @code{nil} is not a cons cell, although it @emph{is} a list.
104 @end defun 103 @end defun
105 104
106 @defun atom object 105 @defun atom object
107 @cindex atoms
108 This function returns @code{t} if @var{object} is an atom, @code{nil} 106 This function returns @code{t} if @var{object} is an atom, @code{nil}
109 otherwise. All objects except cons cells are atoms. The symbol 107 otherwise. All objects except cons cells are atoms. The symbol
110 @code{nil} is an atom and is also a list; it is the only Lisp object 108 @code{nil} is an atom and is also a list; it is the only Lisp object
111 that is both. 109 that is both.
112 110
1303 @end group 1301 @end group
1304 @end example 1302 @end example
1305 @end defun 1303 @end defun
1306 1304
1307 @defun delq object list 1305 @defun delq object list
1308 @cindex deletion of elements 1306 @cindex deleting list elements
1309 This function destructively removes all elements @code{eq} to 1307 This function destructively removes all elements @code{eq} to
1310 @var{object} from @var{list}. The letter @samp{q} in @code{delq} says 1308 @var{object} from @var{list}. The letter @samp{q} in @code{delq} says
1311 that it uses @code{eq} to compare @var{object} against the elements of 1309 that it uses @code{eq} to compare @var{object} against the elements of
1312 the list, like @code{memq} and @code{remq}. 1310 the list, like @code{memq} and @code{remq}.
1313 @end defun 1311 @end defun