]> gitweb.factorcode.org Git - factor.git/commitdiff
assocs: 2cache can be a bit more unsafe.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 24 Sep 2012 00:40:25 +0000 (17:40 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 24 Sep 2012 00:40:25 +0000 (17:40 -0700)
core/assocs/assocs.factor

index 0c9f8c1c8376eedcaca75a7186a025877cb140ca..57291bfec4e3f5aa7c9c34341ad984afab53d61c 100644 (file)
@@ -163,7 +163,7 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
     unless ; inline
 
 : 2cache ( ... key1 key2 assoc quot: ( ... key1 key2 -- ... value ) -- ... value )
-    [ 2array ] 2dip [ first2 ] prepose cache ; inline
+    [ 2array ] 2dip [ first2-unsafe ] prepose cache ; inline
 
 : change-at ( ..a key assoc quot: ( ..a value -- ..b newvalue ) -- ..b )
     [ [ at ] dip call ] [ drop ] 3bi set-at ; inline