 M: sequence set-at
     2dup search-alist
     [ 2nip set-second ]
-    [ drop >r swap 2array r> push ] if ;
+    [ drop [ swap 2array ] dip push ] if ;
 
 M: sequence new-assoc drop <vector> ;
 


: cache ( key assoc quot -- value )
    2over at* [
        >r 3drop r>
    ] [
        drop pick rot >r >r call dup r> r> set-at
    ] if ; inline

: change-at ( key assoc quot -- )
    [ >r at r> call ] 3keep drop set-at ; inline

: at+ ( n key assoc -- )
    [ 0 or + ] change-at ;

GENERIC: >alist ( assoc -- newassoc )

: (assoc-each) ( assoc quot -- seq quot' )
    [ >alist ] dip [ first2 ] prepose ; inline

: assoc-find ( assoc quot -- key value ? )
    (assoc-each) find swap [ first2 t ] [ drop f f f ] if ; inline
