]> gitweb.factorcode.org Git - factor.git/commitdiff
add invalidate-memoized to extra/memoize so that specific entries can be removed...
authorMatthew Willis <matthew.willis@mac.com>
Sun, 25 May 2008 19:00:55 +0000 (12:00 -0700)
committerMatthew Willis <matthew.willis@mac.com>
Sun, 25 May 2008 19:00:55 +0000 (12:00 -0700)
extra/memoize/memoize.factor

index 4136f9eaffc630373e2c6a4dbd0cc731fffc8b00..6a223fdc7e06e8692a3c840ff865d0fc6491a7af 100755 (executable)
@@ -52,3 +52,6 @@ M: memoized definition "memo-quot" word-prop ;
 
 : reset-memoized ( word -- )
     "memoize" word-prop clear-assoc ;
+
+: invalidate-memoized ! ( inputs... word )
+    [ #in packer call ] [ "memoize" word-prop delete-at ] bi ;