Mercury-Language/mercury — pull request #8 by ttmrichter (2013-11-19 06:31:37+00:00)
Title: Improved pqueue library.

New predicates
----------------------
* `is_empty/1`
Test if a priority queue is empty.
* `peek/3`, `peek_key/2`, `peek_value/2`
Extract key/value, just the key or just the value respectively from the lowest item in the queue without removing
the item.
* `det_peek/3`
As `peek/3`, but will raise an error on an empty queue instead of failing.
* `merge/3`
Combines two priority queues into a third.

New functions
--------------------
* `det_peek_key/1`, `det_peek_value/1`
Return the lowest key and value respectively from the queue without removing the item.