[r6rs-discuss] [Formal] Requirement to detect circular lists
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
Received on Tue Oct 03 2006 - 15:13:20 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC