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

AndrevanTonder andre at het.brown.edu
Wed Oct 4 12:26:38 EDT 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




More information about the r6rs-discuss mailing list