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: Stephen Berman
Subject: Re: 'length' function for lists and cons cells?
Date: Thu, 21 Mar 2013 21:02:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Thu, 21 Mar 2013 19:21:29 +0100 Thorsten Jolitz <tjolitz@gmail.com> wrote:

> Hi List, 
>
> which function could I use when I map an alist e.g. with dolist, that
> contains both types of associations as shown below: cons cells, or lists
> with 3 or more elements?
>
> 'length' doesn't work on cons cells:

Since a cons cells always contains exactly two members (its car and its
cdr), why do you want to call a function to find its length?

Steve Berman




reply via email to

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