Why does function apply complain about long lists?
As part of some Eulerian travails , I'm trying to code a Sieve of Eratosthenes with a factorization wheel. My code so far is: (defun ring (&rest content) "Returns a circular list containing the elements in content. The returned list starts with the first element of content." (setf (cdr (last content)) content)) (defun factorization-wheel (lst) "Returns a circular list containing a factorization wheel using the list of prime numbers in lst" (let ((circumference (apply #'* lst))) (loop for i from 1 to circumference unless (some #'(lambda (x) (zerop (mod i x))) lst) collect i into wheel finally