From 7e9d644f2133639b5deb9dfdb6196d78517a2d8a Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Wed, 8 Jul 2020 13:04:01 -0500 Subject: bugfix in range --- gtwiwtg.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))))) -- cgit v1.2.3