     ] if ; inline recursive
 
 : down-heap ( m heap -- )
-    2dup left-bounds-check? [ 2drop ] [ (down-heap) ] if ; inline recursive
+    2dup left-bounds-check?
+    [ 2drop ] [ (down-heap) ] if ; inline recursive
 
 PRIVATE>
 
 M: heap heap-push* ( value key heap -- entry )
-    [ <entry> dup ] [ data-push ] [ ] tri up-heap ;
+    [ <entry> dup ] [ data-push ] [ up-heap ] tri ;
 
 : heap-push ( value key heap -- ) heap-push* drop ;
 

    [ right ] dip data-nth ; inline

: data-set-nth ( entry n heap -- )
    [ [ >>index drop ] [ ] 2bi ] dip
    data>> set-nth-unsafe ; inline

: data-push ( entry heap -- n )
    dup heap-size [
        swap 2dup data>> ensure 2drop data-set-nth
    ] [
    ] bi ; inline

: data-first ( heap -- entry )
    data>> first ; inline


GENERIC: heap-compare ( entry1 entry2 heap -- ? )

: entry<=> ( entry1 entry2 -- <=> )
    { entry entry } declare [ key>> ] compare ; inline

M: min-heap heap-compare drop entry<=> +gt+ eq? ;

M: max-heap heap-compare drop entry<=> +lt+ eq? ;

: heap-bounds-check? ( m heap -- ? )
    heap-size >= ; inline
