aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtwiwtg.lisp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtwiwtg.lisp b/gtwiwtg.lisp
index f52e7b9..202063a 100644
--- a/gtwiwtg.lisp
+++ b/gtwiwtg.lisp
@@ -50,7 +50,9 @@ If TO is NIL, then the generator produces an infinite sequence."
(make-instance 'generator!
:state (list (- from by) to)
:next-p-fn (lambda (state) (or (not to)
- (apply comparator state)))
+ (funcall comparator
+ (+ by (first state))
+ (second state))))
:next-fn (lambda (state)
(incf (car state) by)
(values (car state) state)))))