diff --git a/collects/swindle/misc.ss b/collects/swindle/misc.ss index 78903066f0..892ca6da46 100644 --- a/collects/swindle/misc.ss +++ b/collects/swindle/misc.ss @@ -1842,8 +1842,9 @@ ;;>> (dotimes (i n) body ...) ;;> Loop `n' times, evaluating the body when `i' is bound to 0,1,...,n-1. (defsubst* (dotimes [i n] body0 body ...) - (let loop ([i 0]) - (when (< i n) body0 body ... (loop (add1 i))))) + (let ([n* n]) + (let loop ([i 0]) + (when (< i n*) body0 body ... (loop (add1 i)))))) ;;>> (dolist (x list) body ...) ;;> Loop with `x' bound to elements of `list'.