chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Cyclic lists and the Interpreter


From: Alex Rozenshteyn
Subject: [Chicken-users] Cyclic lists and the Interpreter
Date: Mon, 7 Apr 2008 15:24:41 -0400

(define a (list 'a))
(set-cdr! a a)
;a is now a cyclic "list"
(pair? a) ; -> #t
(list? a) ; -> #f
(length a)

and now the interpreter gets stuck.
control-c does not break (this is because I have the readline egg installed).


I have two questions:
1) How do I get C-c to break?
2) Is the interpreter supposed to freeze if length is passed a cyclic list?  Other scheme implementations generate an error.
--
Alex R
reply via email to

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