         down-heap
     ] if ;
 
-M: priority-queue heap-pop* ( heap -- )
+M: heap heap-pop* ( heap -- )
     dup data-first swap heap-delete ;
 
-M: priority-queue heap-pop ( heap -- value key )
+M: heap heap-pop ( heap -- value key )
     dup data-first [ swap heap-delete ] keep >entry< ;
 
 : heap-pop-all ( heap -- alist )

: >entry< ( entry -- key value )
    [ value>> ] [ key>> ] bi ;

M: priority-queue heap-peek ( heap -- value key )
    data-first >entry< ;

: entry>index ( entry heap -- n )

    ] unless
    entry-index ;

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