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: David Kastrup
Subject: Re: Documentation for car and cdr
Date: Thu, 26 Jan 2006 00:36:08 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Peter Whaite <address@hidden> writes:

> Kim F. Storm <address@hidden> wrote:
>> 
>> I fully agree, but notice that the doc strings for car and cdr 
>> say that the arg is "list".  I think that part of the confusion
>> is that a "pure" list does have a head and a tail and car==head
>> and cdr==tail.
>
> Yes exactly right.  As it is now the  doc string gives the
> misleading impression that c[ad]r operate on lists when they don't.

The terminology in the Elisp manual distinguishes between "true
lists", "circular lists" and "dotted lists".  So a cons cell is a list
always, though not necessarily a "true list".  listp returns t
whenever we have a cons cell or nil.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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