From: Eric Smith
Subject: Village Idioms
Date: 
Message-ID: <ceb68bd9.0305162140.1d580591@posting.google.com>
In a loop I sometimes use "as y = x then y" to have a similar
effect to "with y = x" but to have it executed after x is
calculated during the first iteration.

E.g.

 (loop as x in '(1 2 3)
       as y = x then y
       do (print (list x y)))

(1 1) 
(2 1) 
(3 1) 
NIL

vs

 (loop as x in '(1 2 3)
       with y = x
       do (print (list x y)))

(1 NIL) 
(2 NIL) 
(3 NIL) 
NIL

My question is whether "as y = x then y" is the canonical
idiom for this, or whether I'm overlooking a better way to
express the same thing.

From: P.C.
Subject: Re: Village Idioms
Date: 
Message-ID: <3ec5fb13$0$24623$edfadb0f@dread14.news.tele.dk>
Hi

"Eric Smith" <········@yahoo.com> skrev i en meddelelse
·································@posting.google.com...

> My question is whether "as y = x then y" is the canonical
> idiom for this, or whether I'm overlooking a better way to
> express the same thing.

Mapcar and Apply.

P.C.
From: Espen Vestre
Subject: Re: Village Idioms
Date: 
Message-ID: <kw4r3rjs7p.fsf@merced.netfonds.no>
········@yahoo.com (Eric Smith) writes:

> My question is whether "as y = x then y" is the canonical
> idiom for this, or whether I'm overlooking a better way to
> express the same thing.

It looks o.k. to me (except that I prefer to use 'for', but that's 
a matter of taste). 
-- 
  (espen)