     heap-size >= ; inline
 
 : left-bounds-check? ( m heap -- ? )
-    >r left r> heap-bounds-check? ; inline
+    [ left ] dip heap-bounds-check? ; inline
 
 : right-bounds-check? ( m heap -- ? )
-    >r right r> heap-bounds-check? ; inline
+    [ right ] dip heap-bounds-check? ; inline
 
 : continue? ( m up[m] heap -- ? )
     [ data-nth swap ] keep [ data-nth ] keep


: (child) ( m heap -- n )
    2dup right-value
    >r 2dup left-value r>
    rot heap-compare
    [ right ] [ left ] if ;


    data>> first ; inline

: data-exchange ( m n heap -- )
    [ tuck data-nth [ data-nth ] dip ] 3keep
    tuck [ data-set-nth ] 2dip data-set-nth ; inline

GENERIC: heap-compare ( pair1 pair2 heap -- ? )

