Commits

Moritz Heidkamp committed 688c06c

Less unnecessary retention of input seq's head

Comments (0)

Files changed (1)

 
 (define (parse parser input #!key memoize)
   (parameterize ((memo-table (if memoize (make-hash-table) (memo-table))))
-    (let* ((input (->lazy-seq input))
-           (result (parser (->lazy-seq input))))
+    (let* ((result (parser (->lazy-seq input))))
       (if result
           (values (car result) (cdr result))
-          (values result input)))))
+          (values result (->lazy-seq input))))))
 
 )