Re: Multiple arguments to mapcar?



Pascal: Here's a neat example of using of loop to solve a well-understood problem in a nonobvious way...

(defun primes-below-limit (limit)
(cons 2
(loop for i from 3 by 2 below limit
unless (loop for p in primes
when (integerp (/ i p)) return t)
collect i into primes
finally (return primes))))

I think this is portable and correct, provided limit >= 2.
.