Priority Queue
This module provides purely-functional priority queue based on leftist heap
type Tree<T> = ?(Int, T, Tree<T>, Tree<T>)
func share() : Tree<T>
Get purely-functional representation
func unsafeUnshare(t : Tree<T>)
Put purely-functional representation into class. Need to make sure the tree is constructed with the same compare function
func put(x : T)
Insert an element to the heap
func peekMin() : ?T
Return the minimal element
func deleteMin()
Delete the minimal element
func removeMin() : ?T
Remove the minimal element and return its value
func fromIter<T>(iter : I.Iter<T>, ord : (T, T) -> O.Order) : Heap<T>
Convert iterator into a heap in O(N) time.