Module PriorityQueue


module PriorityQueue: sig .. end
Purely-functional priority queues.

type +'a t 
The abtract type of a priority queue with elements of type 'a.
val empty : 'a t
The empty priority queue.
val is_empty : 'a t -> bool
Is a priority queue empty?
val insert : int -> 'a -> 'a t -> 'a t
Given a priority and an element, insert into a queue.
val peek : 'a t -> 'a
Get the minimal value, if there is one. Raises Not_found if the queue is empty.
val remove_min : 'a t -> 'a t
Remove the minimal element and return the remaining queue. Raises Not_found if the queue is empty.