         [ >alist { array } declare ]
         [ assoc-size 1 + ]
         [ reset-hash ] tri
-    ] keep swap (rehash) ;
+    ] keep (rehash) ;
 
 : ?grow-hash ( hash -- )
     dup hash-large? [ grow-hash ] [ drop ] if ; inline

    [ count>> ] [ deleted>> ] bi - ; inline

: rehash ( hash -- )
    dup >alist [ dup clear-assoc ] dip (rehash) ;

M: hashtable set-at ( value key hash -- )
    dup ?grow-hash dupd new-key@ set-nth-pair ;

: associate ( value key -- hash )
    1 <hashtable> [ set-at ] keep ; inline

    2 fixnum+fast [ set-slot ] 2keep
    1 fixnum+fast set-slot ; inline

: (set-at) ( value key hash -- )
    dupd new-key@ set-nth-pair ; inline

: (rehash) ( alist hash -- )
    [ swapd (set-at) ] curry assoc-each ; inline

: hash-large? ( hash -- ? )
    [ count>> 3 fixnum*fast 1 fixnum+fast ]
