The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Add an element to the Queue if either... a) the queue isn't full, or b) the element belongs in the queue and should displace another

Pop the *least* item off of the priority queue.

Return the least item in the queue, but don't remove it.

Empty the queue into an array, with the highest priority item at index 0.