Steven M. Haflich wrote:
> I think the OP may be looking for something like this:
>
> cl-user(10): (defun foo()
> (let ((x (random 10)))
> (and (< 5 x) x)))
> foo
> cl-user(11): (loop repeat 10
> as x = (foo)
> when x collect x) ; <<<<<
> (6 8 9)
Sweet. But not wnat someone already offered?:
(loop repeat 10
when (foo)
collect it)
As for the use of as, C'ers flame over placing braces in an if statement
-- has there ever been a Lisp flamewar over for vs. as?
If not, is it possible there is a limit to our collective Usenet idiocy?
I feel we are on the verge of an im****tant result.
Do you have a rationale for preferring as over for? I can guess at one
but do not want to compromise the research.
Do you use for with in and as with = or always go with as? If so, then
likewise with for and not as with on, across, over, below, and under?
kenny
--
http://smuglispweeny.blogspot.com/
http://www.theoryyalgebra.com/
"I've never read the rulebook. My job is to catch the ball."
-- Catcher Josh Bard after making a great catch on a foul ball
and then sliding into the dugout, which by the rules allowed the
runners to advance one base costing his pitcher a possible shutout
because there was a runner on third base.
"My sig is longer than most of my articles."
-- Kenny Tilton


|