guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: early termination for `map'


From: Noah Lavine
Subject: Re: early termination for `map'
Date: Thu, 5 May 2011 11:56:18 -0400

That makes sense.

On Thu, May 5, 2011 at 11:24 AM, Andy Wingo <address@hidden> wrote:
> Hello,
>
> If you call `map' or `for-each' with more than one list, our versions of
> these operators will detect if the lists are of unequal length, and
> throw an error in that case.
>
> However, SRFI-1 has long provided an extension to this, to allow for
> early termination when any of the lists runs out.  R6RS adopted this,
> and it looks like R7RS will ratify that.
>
> So perhaps it's time for us to change as well.
>
> This would also allow us to get rid of the hack in srfi-1.c in which,
> when and if GOOPS gets loaded, srfi-1 extends the `map' and `for-each'
> primitive generics with its own early-termination code, which in effect
> gives early termination to every `map' user, regardless of whether that
> module has imported srfi-1 or goops.  Sometimes I think that Mikael put
> the Oops in Goops for a reason ;-)
>
> Andy
> --
> http://wingolog.org/
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]