From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: early termination for `map' Date: Thu, 5 May 2011 11:56:18 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304610989 29463 80.91.229.12 (5 May 2011 15:56:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 May 2011 15:56:29 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu May 05 17:56:24 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QI0ud-0004JT-FA for guile-devel@m.gmane.org; Thu, 05 May 2011 17:56:23 +0200 Original-Received: from localhost ([::1]:34274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI0ud-0002g2-3Q for guile-devel@m.gmane.org; Thu, 05 May 2011 11:56:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI0ua-0002fi-UD for guile-devel@gnu.org; Thu, 05 May 2011 11:56:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QI0uZ-0005QT-MR for guile-devel@gnu.org; Thu, 05 May 2011 11:56:20 -0400 Original-Received: from mail-qy0-f169.google.com ([209.85.216.169]:62245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI0uZ-0005QP-KK for guile-devel@gnu.org; Thu, 05 May 2011 11:56:19 -0400 Original-Received: by qyk2 with SMTP id 2so4309083qyk.0 for ; Thu, 05 May 2011 08:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3iPAkfpBdwiwgHqz5/stC0I/+nV+zpIiKWfTNAr/gmc=; b=w6slQWqeAdhpTaAmFs8hL3h1QfAivrswZmJsBNL+gQkDkno+LgjoBm1cJsp5GG6wBK qCOZm8CQ3VSXX71mWvxabCq6Fls1niUS9WeYckcaV2dlFeM6dlxO0Mj/zd8L7Qxfajkb ouzdEIOnG88vHnfw6lkVSedCt4l5yK/sAKBQw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=OD+a0fyp52Dd9uFQNvPLrdT0THdnF35akEtsG5ZHij4QBpJdtaabjoi7kdoJg2TwDY kYqtO+X97UtXYbTK4FCSSmYeKpDT/lyA9jXouar8jockK88c1B1z8VlblmAuTFsgUA0C ILNkF3fHeg1L5JAQF1E+23zjZ0oTQDlfXvIMc= Original-Received: by 10.52.175.103 with SMTP id bz7mr180948vdc.178.1304610978683; Thu, 05 May 2011 08:56:18 -0700 (PDT) Original-Received: by 10.52.163.5 with HTTP; Thu, 5 May 2011 08:56:18 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: _j-E0kOtB19hOvueC-42_3uA_4w X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12428 Archived-At: That makes sense. On Thu, May 5, 2011 at 11:24 AM, Andy Wingo 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. =A0R6RS 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. =A0Sometimes I think that Mikael put > the Oops in Goops for a reason ;-) > > Andy > -- > http://wingolog.org/ > >