]> gitweb.factorcode.org Git - factor.git/commitdiff
lru-cache: fix M\ lru-cache clone.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Mar 2017 02:41:24 +0000 (18:41 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Mar 2017 02:41:24 +0000 (18:41 -0800)
extra/lru-cache/lru-cache.factor

index 54e39c847f501538f7646aab5b8a7599f870d149..e7d82e2da1343d4ff3fb0ef0a12ec1e86995f792 100644 (file)
@@ -31,3 +31,7 @@ M: lru-cache set-at
             [ dlist>> ] tri (delete-at)
         ] [ drop ] if
     ] [ drop ] if* ;
+
+M: lru-cache clone
+    [ assoc>> clone ] [ dlist>> clone ] [ max-size>> ] tri
+    lru-cache boa ;