
(/VERSIONCHECK 2) 

(DEFPARAMETER |PriorityQueueAggregate;CAT| 'NIL) 

(DEFPARAMETER |PriorityQueueAggregate;AL| 'NIL) 

(DEFUN |PriorityQueueAggregate| (#0=#:G1816)
  (LET (#1=#:G1817)
    (COND
      ((SETQ #1#
             (|assoc| #2=(|devaluate| #0#) |PriorityQueueAggregate;AL|))
       (CDR #1#))
      (T (SETQ |PriorityQueueAggregate;AL|
               (|cons5| (CONS #2#
                              (SETQ #1#
                                    (|PriorityQueueAggregate;| #0#)))
                        |PriorityQueueAggregate;AL|))
         #1#)))) 

(DEFUN |PriorityQueueAggregate;| (|t#1|)
  (PROG (#0=#:G1815)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                       (COND
                         (|PriorityQueueAggregate;CAT|)
                         ('T
                          (LETT |PriorityQueueAggregate;CAT|
                                (|Join| (|BagAggregate| '|t#1|)
                                        (|finiteAggregate|)
                                        (|mkCategory| '|domain|
                                         '(((|max| (|t#1| $)) T)
                                           ((|merge| ($ $ $)) T)
                                           ((|merge!| ($ $ $)) T))
                                         NIL 'NIL NIL))
                                . #1=(|PriorityQueueAggregate|))))) . #1#)
        (SETELT #0# 0
                (LIST '|PriorityQueueAggregate| (|devaluate| |t#1|))))))) 
