early termination for `map'

2011-05-05 Thread Andy Wingo
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/

Re: early termination for `map'

2011-05-05 Thread Noah Lavine
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

Re: early termination for `map'

2011-05-05 Thread Ludovic Courtès
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

Re: early termination for `map'

2011-05-05 Thread Andy Wingo
On Thu 05 May 2011 17:24, Andy Wingo wi...@pobox.com writes: 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

Re: early termination for `map'

2011-05-05 Thread Andy Wingo
, and instead of failing nicely it corrupted memory. 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

Re: early termination for `map'

2011-05-05 Thread Ludovic Courtès
Andy Wingo wi...@pobox.com writes: On Thu 05 May 2011 18:26, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com writes: 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

Re: early termination for `map'

2011-05-05 Thread Andy Wingo
Hi, On Thu 05 May 2011 22:21, l...@gnu.org (Ludovic Courtès) writes: Yes, and I think we can keep rewriting SRFI-1 in Scheme, even in 2.0. So I implemented map in Scheme Ooh, interesting. :-) I pushed to stable-2.0. Let me know if you want me to back it out. Cheers, Andy --