From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44323 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: cl in message.el, etc Date: Sun, 21 Apr 2002 12:28:11 +1000 Organization: Not today, thank you, Mother. Sender: owner-ding@hpc.uh.edu Message-ID: <87662lkcp0.fsf@inanna.rimspace.net> References: <87g01r74d7.fsf@alum.wpi.edu> <87lmbjm3v3.fsf@inanna.rimspace.net> <87r8la8ks2.fsf@alum.wpi.edu> <87vgamjr1a.fsf@inanna.rimspace.net> <87hem68ean.fsf@alum.wpi.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019356232 25272 127.0.0.1 (21 Apr 2002 02:30:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 21 Apr 2002 02:30:32 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16z77Y-0006ZN-00 for ; Sun, 21 Apr 2002 04:30:32 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16z767-0001rE-00; Sat, 20 Apr 2002 21:29:03 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Apr 2002 21:29:13 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id VAA10462 for ; Sat, 20 Apr 2002 21:29:02 -0500 (CDT) Original-Received: (qmail 27427 invoked by alias); 21 Apr 2002 02:28:31 -0000 Original-Received: (qmail 27422 invoked from network); 21 Apr 2002 02:28:30 -0000 Original-Received: from melancholia.rimspace.net (HELO melancholia.danann.net) (210.23.138.19) by gnus.org with SMTP; 21 Apr 2002 02:28:30 -0000 Original-Received: from localhost (melancholia.rimspace.net [210.23.138.19]) by melancholia.danann.net (Postfix) with ESMTP id AAC952A823 for ; Sun, 21 Apr 2002 12:28:14 +1000 (EST) Original-Received: by localhost (Postfix, from userid 1000) id DEE9D8200B; Sun, 21 Apr 2002 12:28:11 +1000 (EST) Original-To: ding@gnus.org In-Reply-To: <87hem68ean.fsf@alum.wpi.edu> (Josh Huber's message of "Sat, 20 Apr 2002 13:34:24 -0400") Original-Lines: 39 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.5 (bamboo, i686-pc-linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44323 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44323 On Sat, 20 Apr 2002, Josh Huber wrote: > Daniel Pittman writes: [...] >> I screwed up in my thinking about the problem space and, as a >> result, gave you something that works if and only if (= (length >> mft-regexps) (length recipients)). > > Ah, okay. It's still good to know -- the cl 'and' loop construct only > works with lists of equal length? Saying (loop for foo in bar and qux in quux) means that each iteration will bind 'foo' to the next element of 'bar' /and/ 'qux' to the next element of 'quux', in parallel. Once either list is empty the loop terminates, by default. So, they only perform as many steps as the shortest list. >> You want the first entry in recipients that matched any regexp in >> mft-regexps, right? > > That's correct. Good. It occurred to me that I might have had that wrong as well. :) [... correct code dropped ...] > Yep, this is it. That should be as good as, or better than, the existing code. It should also be comprehensible, so I would be happy to see it committed. `loop' is a macro and shouldn't be a runtime CL issue... Daniel -- The sky above the port was the color of television, tuned to a dead channel. -- William Gibson, __Neuromancer__