[r6rs-discuss] [Formal] Requirement to detect circular lists

From: Dan Muresan <dan-r6rs>
Date: Tue Oct 3 03:46:29 2006

>> (let ((x (list 1 2)))
>> (set-cdr! (cdr x) x) ;; x = #0=(1 2 . #0#)
>> (map f some-list x))

> I may be misinterpreting what you mean by "miss it", but this example
> isn't valid in R5RS, so it's not something that used to be portable but no
> longer is. In fact, it now has a portable semantics (though probably not
> the one you want), where it had none before.

The question is, which behavior would be more useful? Circularity checks,
or allowing Shiro and Andre's elegant constructs? I personally think the
answer is very, very obvious.

Best,
Dan Muresan
http://alumnus.caltech.edu/~muresan
Received on Tue Oct 03 2006 - 03:45:50 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC