emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation for car and cdr


From: Luc Teirlinck
Subject: Re: Documentation for car and cdr
Date: Sat, 28 Jan 2006 14:13:29 -0600 (CST)

Peter Whaite wrote:

   > Your wording suggests that a cons cell and a list are different
   > things, but a cons  cell.

   Not sure what your intent here is, but a list and a cons cell are
   different.  A list is a structure made from cons cells and atoms.
   A cons cell is, er, a cons cell.

I am not sure what Lisp dialect you have in mind, but both in Elisp
and in Common Lisp, a list is a Lisp object that is either a cons cell
or the symbol nil and "cons cell" is synonymous with non-nil list.

>From `(elisp)List-related Predicates':

 -- Function: listp object
     This function returns `t' if OBJECT is a cons cell or `nil'.
     Otherwise, it returns `nil'.

The Common Lisp function `listp' behaves the same way.

Sincerely,

Luc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]