     (assoc-each) each ; inline
 
 : assoc>map ( assoc quot exemplar -- seq )
-    >r accumulator >r assoc-each r> r> like ; inline
+    [ accumulator [ assoc-each ] dip ] dip like ; inline
 
 : assoc-map-as ( assoc quot exemplar -- newassoc )
-    >r [ 2array ] compose V{ } assoc>map r> assoc-like ; inline
+    [ [ 2array ] compose V{ } assoc>map ] dip assoc-like ; inline
 
 : assoc-map ( assoc quot -- newassoc )
     over assoc-map-as ; inline
 
 : assoc-push-if ( key value quot accum -- )
-    >r 2keep r> roll
-    [ >r 2array r> push ] [ 3drop ] if ; inline
+    [ 2keep rot ] dip swap
+    [ [ 2array ] dip push ] [ 3drop ] if ; inline
 
 : assoc-pusher ( quot -- quot' accum )
     V{ } clone [ [ assoc-push-if ] 2curry ] keep ; inline
 
+: assoc-filter-as ( assoc quot exemplar -- subassoc )
+    [ assoc-pusher [ assoc-each ] dip ] dip assoc-like ; inline
+
 : assoc-filter ( assoc quot -- subassoc )
-    over >r assoc-pusher >r assoc-each r> r> assoc-like ; inline
+    over assoc-filter-as ; inline
 
 : assoc-contains? ( assoc quot -- ? )
     assoc-find 2nip ; inline


: 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 ;

M: sequence set-at
    2dup search-alist
    [ 2nip set-second ]
    [ drop [ swap 2array ] dip push ] if ;

M: sequence new-assoc drop <vector> ;

