[EMAIL PROTECTED] (Harvey J. Stein), 14 Dec 2004 17:26:15 -0500]: > > > (defun sumn (n) > > > (declare (type (integer 0 10000) n)) > > > (let ((s 0)) > > > (declare (type (integer 0 200000000) s)) > > > (dotimes (i n) > > > (incf s i)) > > > s)) > > > > Uh, shouldn't i be declared fixnum as well? > > It seems that in cmucl, dotimes includes a declaration for the iteration > variable: > ... So I have to leave the decls out. > Otherwise the compiler essentially complains about an incompatible > redefinition.
This may be naive, and I cannot check from here, but can't you do something like (dotimes (i n) (locally (declare (type (integer 0 10000) i)) (incf s i)))? Albert.
