Given two lists of identical size (ideally extensible to trees) use
dolists to progress through them in parallel, e.g.
+
(dolist | (dolists
(element list | ( (elt1 list1)
(myfunction element) ) | (elt2 list2) )
| (myfunction elt1 elt2) )
+
Today's Tongue Twister: Do dolists exists?
Thanks, =)
--
Hovig Heghinian | `Once I fell in love with the art of calculation, I
U of Illinois at | thought that no philosophical notion can be constructed
Urbana-Champaign | without number, considering it the mother of all wisdom.'
Dept of CompSci | Anania of Shirak, Armenia, 7th century AD
From: Peter Dudey, Order of the Golden Parentheses
Subject: Re: Is there a dolists (i.e. parallel dolist)?
Date:
Message-ID: <22kg0vINN3ke@flop.ENGR.ORST.EDU>
In article <··········@vixen.cso.uiuc.edu> ·····@uxa.cso.uiuc.edu (Hovig Heghinian) writes:
>
> Given two lists of identical size (ideally extensible to trees) use
>dolists to progress through them in parallel, e.g.
>
> +
> (dolist | (dolists
> (element list | ( (elt1 list1)
> (myfunction element) ) | (elt2 list2) )
> | (myfunction elt1 elt2) )
> +
Well, you could do:
(mapcar #'myfunction list1 list2)
Remember, if it makes sense, it's already built into Lisp. Otherwise, you can do it in C...
--
: Peter Dudey, ······@storm.cs.orst.edu, 257 NE 13th, Salem, OR 97301 :
: Oregon State University, Dept. of Computer Science (MS student in AI) :
: My views are my own, and I'm more than willing to discuss them. :
: Please finger me for some questions I have, and email any answers. :