aboutsummaryrefslogtreecommitdiff
path: root/gn/cache
diff options
context:
space:
mode:
Diffstat (limited to 'gn/cache')
-rw-r--r--gn/cache/memoize.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/gn/cache/memoize.scm b/gn/cache/memoize.scm
index 42b2163..b79e026 100644
--- a/gn/cache/memoize.scm
+++ b/gn/cache/memoize.scm
@@ -18,8 +18,8 @@
"Simple memoize just uses alists at this point and does not expire"
(let ((result-table '()))
(lambda (. args)
- (let ((cache-value (assoc args (pk result-table))))
- (if (pk cache-value)
+ (let ((cache-value (assoc args result-table)))
+ (if cache-value
(cdr cache-value)
(let ((result (apply f args)))
(set! result-table
@@ -29,8 +29,8 @@
"Simple memoize functions that returns values pair and uses alists at this point and does not expire"
(let ((result-table '()))
(lambda (. args)
- (let ((c (assoc args (pk result-table))))
- (if (pk c)
+ (let ((c (assoc args result-table)))
+ (if c
(values (car (cdr c)) (car (cdr (cdr c))))
(let-values (((r1 r2) (apply f args)))
(set! result-table