diff --git a/basis/heaps/heaps.factor b/basis/heaps/heaps.factor index 049b27d058..6193d9fa2c 100644 --- a/basis/heaps/heaps.factor +++ b/basis/heaps/heaps.factor @@ -194,3 +194,9 @@ ERROR: not-a-heap obj ; [ check-heap ] dip over heap-empty? [ 2drop ] [ [ [ heap-pop drop ] dip call ] [ slurp-heap ] 2bi ] if ; inline recursive + +: >min-heap ( assoc -- min-heap ) + [ heap-push-all ] keep ; + +: >max-heap ( assoc -- min-heap ) + [ heap-push-all ] keep ;