declare fun {NewPrioQueue} Q={NewCell nil} proc {Enqueue X Prio} fun {InsertLoop L} case L of pair(Y P)|L2 then if Prio