Next: , Previous: , Up: psqs   [Contents][Index]


6.3 Priority queue operations

Function: psq-min PSQ

Return the key of the minimum association in PSQ. If the queue is empty: an assertion violation is raised.

(let* ((Q (make-psq string< <))
       (Q (psq-set Q "salut" 2))
       (Q (psq-set Q "hello" 1))
       (Q (psq-set Q "ciao"  4))
       (Q (psq-set Q "ohayo" 3)))
  (psq-min Q))
⇒ "hello"
Function: psq-delete-min PSQ

Return the priority search queue obtained by removing the minimum association in PSQ. If the queue is empty: an assertion violation is raised.

Function: psq-pop PSQ

Return 2 values:

  1. The minimum key.
  2. The priority search queue obtained by removing the minimum association from PSQ.

If the queue is empty: an assertion violation is raised.


Next: , Previous: , Up: psqs   [Contents][Index]

This document describes version 0.5.0-devel.1 of MMCK PFDS.