Code: Select all
(defun prime-list (n m)
(declare (optimize (speed 0) (debug 0) (safety 0)))
(declare (type fixnum n)
(type fixnum m))
(let ((primes (loop for i from
((lambda (c) (if (evenp c)
(+ c 1)
c)) n)
to m by 2
when (primep i)
collect i)))
(if (< n 3)
(append '(2) primes)
primes)))
Code: Select all
(time (prime-list 0 200000))
Is there a way to suppress the P in REPL? I am using SBCL under SLIME if that matters.