I occasionally run across situations where I want dolist to set more than one variable for more than one list. Suppose we have two lists
L1 (a b c ... n)
L2 (A B C... N)
I would like to be able to write something like
(dolist ('(X Y) L1 L2)
<dostuff here>
)
where sequentially X would be set to a,b,c... and Y to A,B,C...
I would also like to write
(dolist (X L1 L2)
<dostuff here>
)
where X would sequentially be set to a series of lists (a A)(b B) ...
Is there some elegant way of doing these that I am unaware of?
I use map for those occasions.
(map (fn (x y) (whatever with x and y))
X Y)
eddie