assocs: 2cache can be a bit more unsafe.

db4
John Benediktsson 2012-09-23 17:40:25 -07:00
parent 02d45f1ac8
commit ebd7ab088d
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
unless ; inline unless ; inline
: 2cache ( ... key1 key2 assoc quot: ( ... key1 key2 -- ... value ) -- ... value ) : 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 ) : change-at ( ..a key assoc quot: ( ..a value -- ..b newvalue ) -- ..b )
[ [ at ] dip call ] [ drop ] 3bi set-at ; inline [ [ at ] dip call ] [ drop ] 3bi set-at ; inline