From aaf3d8fe53a0cae30852029a66184882a29e76c5 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 8 Feb 2016 14:23:50 -0800 Subject: [PATCH] add kw support to make-caching-proc --- cache.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cache.rkt b/cache.rkt index a7f7e9b..d774a9c 100644 --- a/cache.rkt +++ b/cache.rkt @@ -4,8 +4,9 @@ (define+provide+safe (make-caching-proc base-proc) (procedure? . -> . procedure?) (let ([cache (make-hash)]) - (λ args - (hash-ref! cache args (λ () (apply base-proc args)))))) + (make-keyword-procedure + (λ (kws kw-args . args) + (hash-ref! cache args (λ () (keyword-apply base-proc kws kw-args args))))))) (provide+safe define/caching) (define-syntax (define/caching stx)