help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: 'length' function for lists and cons cells?


From: Pascal J. Bourguignon
Subject: Re: 'length' function for lists and cons cells?
Date: Sat, 23 Mar 2013 16:52:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

>> > So if both, true lists and cons cells, are processed in a... 
>> 
>> proper-lists, not true lists.  
>> They all are true lists, ie. cons cells or nil.
>
> Maybe for some people.  For others, "true list" and "proper list" mean the 
> same
> thing.  FWIW, Emacs itself calls such a beast a "true list".

Even emacs itself calls such beasts true lists:

(typep '()                   'list) --> t
(typep '(1)                  'list) --> t
(typep '(1 . #1=(2 3 . #1#)) 'list) --> t
(typep '(1 . 2)              'list) --> t



>>From (elisp) `Cons Cells':
>
>   Also by convention, the CDR of the last cons cell in a
>   list is `nil'.  We call such a `nil'-terminated structure
>   a "true list".  

No, f[…] manual, you're dumbing down the language, which is
patronizing and error inducing.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


reply via email to

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