[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Question regarding "length"
From: |
Abdulaziz Ghuloum |
Subject: |
[Chicken-users] Question regarding "length" |
Date: |
Fri, 26 May 2006 21:17:48 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 |
Greetings,
Looking at the definition of length in chicken, I noticed that it
detects neither circularities nor improper lists. For example:
(length '(1 2 . 3)) => 2
and
(length (let ((x (cons 1 2))) (set-cdr! x x) x)) => infinite loop.
I'm wondering if this is a bug, or a design decision. And if it
is by design (my guess), I would like to know the rationale behind it.
Thanks.
Aziz,,,