From 4e14c53ddb7aee93f53910707dec2ee7fef13829 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Tue, 30 May 2017 15:35:57 +0900 Subject: [PATCH] bring memoize-to-file up-to-date with string-cursor api --- lib/chibi/memoize.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chibi/memoize.scm b/lib/chibi/memoize.scm index 81dd751b..5c72aee0 100644 --- a/lib/chibi/memoize.scm +++ b/lib/chibi/memoize.scm @@ -163,7 +163,7 @@ (string-append "%0" hex) (string-append "%" hex)))) (define (collect str from to res) - (if (>= from to) + (if (string-cursor>=? from to) res (cons (substring-cursor str from to) res))) (let ((start (string-cursor-start str)) @@ -212,7 +212,7 @@ (read read: read/ss) (write write: write/ss)) (lambda args - (let ((file (make-path memo-dir (apply args-encoder args)))) + (let ((file (make-path memo-dir (args-encoder args)))) (define (compute) (let ((res (apply proc args))) (create-directory* (path-directory file))