Brian Schr?der wrote:
> Hello Group,
>
> I'm currently polishing my priority queue implementation, and I'm in
> need for a name for some methods.
>
> I have the following behaviour now
>
> q = PriorityQueue.new
> q["0"] = 0
> q["1"] = 1
> q["2"] = 2
> q.delete_min #=> ["0", 0]
> q.delete_min_return_key #=> "1"
> q.delete_min_return_priority #=> 2
>
> and wonder how I could call the last two methods. I want these,
> because delete_min returns nil if the queue is empty, and I can't
> index nil. So for some code these additional functions are quite
> convenient.

How about
#deq
#deq_key
#deq_prio

?

Kind regards

    robert