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

From: AndrevanTonder <andre>
Date: Wed Oct 4 12:29:26 2006

I really appreciate you patience so far, and I am sorry to
keep harping on this - I just really wish to understand it
fully.

You agreed previously (I think) that Shiro Kawai's example
should raise an error if xs is not a plausible list:

> (call/cc
> (lambda (k)
> (for-each (lambda (x) (if (negative? x) (k x))) xs)))

However, you also stated in a separate post that up-front
checking is not necessarily required:

> The arguments can be checked at any time before the
> first return from the procedure. For example, a
> concurrent thread can check the arguments while
> another thread performs the R5RS-compatible work.

However, I do not understand how an implementation of this
type, that does not do up-front checking, can guarantee that
an error will be raised in Shiro's example (given likely
implementations of call/cc continuations).

Andre
Received on Wed Oct 04 2006 - 12:26:38 UTC

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