[ library(heaps) | Reference Manual | Alphabetic Index ]
min_of_heap(+Heap, ?Key1, ?Datum1, ?Key2, ?Datum2)
returns the smallest and second smallest pairs in the heap
Description
    returns the smallest (Key1) and second smallest (Key2) pairs in
    the heap, without deleting them.  It fails if the heap does not
    have at least two elements.