 
 : with-side ( side quot -- ) [ swap current-side set call ] with-scope ; inline
 : with-other-side ( quot -- )
-    current-side get invert-comparison swap with-side ; inline
-: go-left ( quot -- ) +lt+ swap with-side ; inline
-: go-right ( quot -- ) +gt+ swap with-side ; inline
+    current-side get neg swap with-side ; inline
+: go-left ( quot -- ) left swap with-side ; inline
+: go-right ( quot -- ) right swap with-side ; inline
 
 : change-root ( tree quot -- )
     swap [ root>> swap call ] keep set-tree-root ; inline

    ] if ;

: delete-bst-node ( key node -- node )
    2dup node-key <=> dup +eq+ eq? [
        drop nip delete-node
    ] [
        [ tuck node-link delete-bst-node over set-node-link ] with-side

: leaf? ( node -- ? )
    [ left>> ] [ right>> ] bi or not ;

: random-side ( -- side ) left right 2array random ;

: choose-branch ( key node -- key node-left/right )
    2dup node-key key-side [ node-link ] with-side ;

: node-at* ( key node -- value ? )
    [
