Ticket #440: patch-memoize

File patch-memoize, 833 bytes (added by Alan Post, 13 years ago)

patch to make the memoizer a no-op.

Line 
1diff --git a/morji.scm b/morji.scm
2index a8e10d4..7a0268e 100644
3--- a/morji.scm
4+++ b/morji.scm
5@@ -43,12 +43,10 @@
6       (lambda (nunjavni)
7         (let ((morji (make-hash-table equal?)))
8           (define (morji-nunjavni . sumti)
9-            (hash-table-ref morji
10-                            sumti
11-                            (lambda ()
12-                              (let ((javni (apply nunjavni sumti)))
13-                                (hash-table-set! morji sumti javni)
14-                                javni))))
15+            (let ((javni (apply nunjavni sumti)))
16+              (if (not (hash-table-exists? morji sumti))
17+                  (hash-table-set! morji sumti javni))
18+              javni))
19 
20           ;; register our cache with the global cache so
21           ;; we can delete our memoization rules when we