summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/utils.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/chickadee/utils.scm b/chickadee/utils.scm
index e2a20c1..8869e8d 100644
--- a/chickadee/utils.scm
+++ b/chickadee/utils.scm
@@ -40,11 +40,12 @@
(e end)
(reverse? (< e s))
(start* (if reverse? e s))
- (end* (if reverse? s e)))
+ (end* (if reverse? s e))
+ (inc* (abs inc)))
(let loop ((var start*))
(when (< var end*)
body ...
- (loop (+ var inc))))))
+ (loop (+ var inc*))))))
((_ ((var end start)) body ...)
(for-range ((var end start 1)) body ...))
((_ ((var end)) body ...)