For all the procedures: the argument ITEM< must be a procedure accepting 2 arguments, being
items from the heap, and returning #t
if the first is less than the second; if the collected
items are numbers: ITEM< can be <
; if the collected items are strings: ITEM< can
be string<?
.
Return a new empty heap which uses the given ordering procedure.
Return a new heap, ordered by the procedure argument ITEM<, that contains all the other arguments as items.
Return #t
if OBJ is a heap, #f
otherwise.
Return a non–negative integer representing the number of items in heap.
Return #t
if the heap contains no items, #f
otherwise.
Return the minimum item in heap, according the heap’s ordering procedure. If there are no
items: a pfds-heap-empty-condition
condition is raised.
Return a new heap containing all the items of heap, except for the minimum argument, as
determined by the heap’s ordering procedure. If there are no items: raise a condition with kind
pfds-heap-empty
.
Return #t
if OBJ is a condition with kind pfds-heap-empty
; otherwise return
#f
.
Return two values: the the minimum item in heap, and a heap obtained by removing the minimum
value from the original heap. If heap is empty: raise a condition with kind
pfds-heap-empty
.
Return a new heap obtained by adding item to those in the heap.
Return a list containing all the items of heap. The items of the list are ordered according to the heap’s ordering procedure.
Return a heap containing all the items of the given list, using the procedure argument ITEM< to order them.
Return the heap containing all the items of the argument heaps. The argument heaps are assumed to be using the same ordering procedure.
Return a new list that is a permutation of the list-of-items, such that all the items are ordered by the given procedure ITEM<.
Return the ordering procedure used internally by heap.
This document describes version 0.5.0-devel.1 of MMCK PFDS.