From: Tim Bradshaw Subject: Re: Cons Cells Date: Message-ID: <ey3el97p2yq.fsf@cley.com>
* A Melon wrote: > How can I create a function in Lisp to count the number of cons cells that a list is using? For > example, (num-cons-cells '(1 2 (3 (4 5)) 6)) => 8. If something is a cons, add one to the sum of counts of the cons cells in its car and cdr, otherwise there are no cons cells. --tim