From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: early termination for `map' Date: Thu, 05 May 2011 20:27:01 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1304620033 21618 80.91.229.12 (5 May 2011 18:27:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 May 2011 18:27:13 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu May 05 20:27:09 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 1QI3GX-0000MM-1X for guile-devel@m.gmane.org; Thu, 05 May 2011 20:27:09 +0200 Original-Received: from localhost ([::1]:49277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI3GW-0006Z1-Gw for guile-devel@m.gmane.org; Thu, 05 May 2011 14:27:08 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI3GU-0006Yk-90 for guile-devel@gnu.org; Thu, 05 May 2011 14:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QI3GT-00046k-CS for guile-devel@gnu.org; Thu, 05 May 2011 14:27:06 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:58089 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI3GT-00046g-AI for guile-devel@gnu.org; Thu, 05 May 2011 14:27:05 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 2481940BE for ; Thu, 5 May 2011 14:29:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=IHf/BZQTNI26Y1wuzQ846B1gwG8=; b=rI0xyr FB9Y+Szqxbt80r/OCzXphYWmg7zjTnIY1j+gVlkxekFXjtWrmf8cNfkirE+ivpUf uJB0EfM9aZg60lg36E04ZrjyHqoFl5eFKxGeSh1CydBe8rgigrVJ99l4IBcJxiPv fAf3oGwbzlpMb/Br3hVdmHehSIY0mHQ6N/HKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=khVt/VfG9nHFTxO287fj78y7RGqjBDqY 6RDxfYTlNRiWL0IlWi2oX3FSkU3l6o6EvqdVR6OWjus7fA4TfWHIIzrInV1XzJ6x 0G14bTVNmGK/U+6VfbiN8/xwhku/i9hXIVvAOhzaOy8irGOgK8ChlVF75r7Knd+u mwb1sWmAPp0= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 1F71040BD for ; Thu, 5 May 2011 14:29:09 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id AE0AB40BC for ; Thu, 5 May 2011 14:29:08 -0400 (EDT) In-Reply-To: (Andy Wingo's message of "Thu, 05 May 2011 17:24:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 90FF88C0-7745-11E0-9E76-90BEB0B5FC3A-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 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:12435 Archived-At: On Thu 05 May 2011 17:24, Andy Wingo 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 allow for > early termination when any of the lists runs out. R6RS adopted this, > and it looks like R7RS will ratify that. FWIW I think I misremembered here: R6RS map requires the lists to be of the same length. Andy -- http://wingolog.org/