From b1c309e3ca19f7557a3917f26f933d864c926c33 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Tue, 22 Aug 2023 10:37:41 +0200 Subject: Remove pk statements --- gn/cache/memoize.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gn') 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 -- cgit v1.2.3