 
 M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
     [ dup assoc-size ] dip new-assoc
-    [ [ swapd set-at ] curry assoc-each ] keep ;
+    [ [ set-at ] with-assoc assoc-each ] keep ;
 
 : keys ( assoc -- keys )
     [ drop ] { } assoc>map ;

: substituter ( assoc -- quot )
    [ dupd at* [ nip ] [ drop ] if ] curry ; inline

PRIVATE>

: assoc-find ( assoc quot -- key value ? )

    [ at* ] 2keep delete-at ;

: rename-at ( newkey key assoc -- )
    [ delete-at* ] keep [ set-at ] with-assoc [ 2drop ] if ;

: assoc-empty? ( assoc -- ? )
    assoc-size 0 = ;
