
(/VERSIONCHECK 2) 

(DEFPARAMETER |QueueAggregate;CAT| 'NIL) 

(DEFPARAMETER |QueueAggregate;AL| 'NIL) 

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

(DEFUN |QueueAggregate;| (|t#1|)
  (PROG (#0=#:G1815)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                       (COND
                         (|QueueAggregate;CAT|)
                         ('T
                          (LETT |QueueAggregate;CAT|
                                (|Join| (|BagAggregate| '|t#1|)
                                        (|finiteAggregate|)
                                        (|mkCategory| '|domain|
                                         '(((|enqueue!|
                                             (|t#1| |t#1| $))
                                            T)
                                           ((|dequeue!| (|t#1| $)) T)
                                           ((|rotate!| ($ $)) T)
                                           ((|length|
                                             ((|NonNegativeInteger|) $))
                                            T)
                                           ((|front| (|t#1| $)) T)
                                           ((|back| (|t#1| $)) T))
                                         NIL '((|NonNegativeInteger|))
                                         NIL))
                                . #1=(|QueueAggregate|))))) . #1#)
        (SETELT #0# 0 (LIST '|QueueAggregate| (|devaluate| |t#1|))))))) 
