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

Shiro Kawai shiro at lava.net
Tue Oct 3 15:13:20 EDT 2006


From: John Cowan <cowan at ccil.org>
Subject: Re: [r6rs-discuss] [Formal] Requirement to detect circular lists
Date: Tue, 3 Oct 2006 10:20:23 -0400

> Shiro Kawai scripsit:
> 
> > And I think you are comparing somewhat different things in your
> > last paragraph.   If the future RnRS doesn't have mutable pairs,
> > 'map' will never receive a circular lists in RnRS compliant code
> > (since there's no such thing like a circular lists in RnRS world),
> 
> Not necessarily.  For example, one might introduce a primitive
> (circular p q), where q is some non-empty tail of p, that returns
> a list that is linear from p to q and circular back to q.  This
> cannot be *implemented* without pair mutation, but it does not
> *expose* pair mutation.

Do you expect RnRS will have 'circular'?   I doubt it.  As far
as RnRS don't provide a way to introduce circular lists, my
argument is still valid---an implementation can introduce an
extention to create a circular list, and naturally extend
RnRS-conforming 'map' to accept such a list.

--shiro






More information about the r6rs-discuss mailing list