[Top][All Lists]
[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: |
Wed, 25 Jan 2006 12:07:10 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Mario Domenech Goulart <address@hidden> writes:
> On Wed, 25 Jan 2006 00:14:32 +0100 David Kastrup <address@hidden> wrote:
>
>> Mario Domenech Goulart <address@hidden> writes:
>>
>>> Wouldn't it be better to write something like "Return the first
>>> element of list" and "Return a list containing all but the first
>>> element of list" for car and cdr, respectively?
>>
>> No. cons cells don't need to point to an atom in their car, or to a
>> cons cell or nil in their cdr. This is fundamental Lisp terminology.
>
> Actually I didn't make any assumption about what `element' can be.
But only true lists have elements like those you write about, dotted
lists haven't.
> But admittedly, the text about cdr is faulty, since (listp '(a . b)) is
> t, for example.
I would not call a the first element of a "list" '(a . b).
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Documentation for car and cdr, Mario Domenech Goulart, 2006/01/24
- Re: Documentation for car and cdr, Richard M. Stallman, 2006/01/25
- Re: Documentation for car and cdr, Alan Mackenzie, 2006/01/25
- Re: Documentation for car and cdr, Bill Atkins, 2006/01/25
- Re: Documentation for car and cdr, Alan Mackenzie, 2006/01/25
- Re: Documentation for car and cdr, Bill Atkins, 2006/01/25
- Re: Documentation for car and cdr, David Kastrup, 2006/01/25
- Re: Documentation for car and cdr, Thien-Thi Nguyen, 2006/01/25
- Re: Documentation for car and cdr, Lennart Borgman, 2006/01/25