 : >entry< ( entry -- key value )
     [ value>> ] [ key>> ] bi ;
 
-M: priority-queue heap-peek ( heap -- value key )
+M: heap heap-peek ( heap -- value key )
     data-first >entry< ;
 
 : entry>index ( entry heap -- n )

    ] unless
    entry-index ;

M: priority-queue heap-delete ( entry heap -- )
    [ entry>index ] keep
    2dup heap-size 1- = [
        nip data-pop*


: <max-heap> ( -- max-heap ) max-heap <heap> ;

M: heap heap-empty? ( heap -- ? )
    data>> empty? ;

M: heap heap-size ( heap -- n )
    data>> length ;

<PRIVATE
