
(/VERSIONCHECK 2) 

(DEFPARAMETER |TableAggregate;CAT| 'NIL) 

(DEFPARAMETER |TableAggregate;AL| 'NIL) 

(DEFUN |TableAggregate| (&REST #0=#:G1823)
  (LET (#1=#:G1824)
    (COND
      ((SETQ #1#
             (|assoc| #2=(|devaluateList| #0#) |TableAggregate;AL|))
       (CDR #1#))
      (T (SETQ |TableAggregate;AL|
               (|cons5| (CONS #2#
                              (SETQ #1#
                                    (APPLY #'|TableAggregate;| #0#)))
                        |TableAggregate;AL|))
         #1#)))) 

(DEFUN |TableAggregate;| (|t#1| |t#2|)
  (PROG (#0=#:G1822)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)))
                       (COND
                         (|TableAggregate;CAT|)
                         ('T
                          (LETT |TableAggregate;CAT|
                                (|Join| (|KeyedDictionary| '|t#1|
                                         '|t#2|)
                                        (|IndexedAggregate| '|t#1|
                                         '|t#2|)
                                        (|mkCategory| '|domain|
                                         '(((|setelt|
                                             (|t#2| $ |t#1| |t#2|))
                                            T)
                                           ((|table| ($)) T)
                                           ((|table|
                                             ($
                                              (|List|
                                               (|Record|
                                                (|:| |key| |t#1|)
                                                (|:| |entry| |t#2|)))))
                                            T)
                                           ((|map|
                                             ($
                                              (|Mapping| |t#2| |t#2|
                                               |t#2|)
                                              $ $))
                                            T))
                                         NIL
                                         '((|List|
                                            (|Record| (|:| |key| |t#1|)
                                             (|:| |entry| |t#2|))))
                                         NIL))
                                . #1=(|TableAggregate|))))) . #1#)
        (SETELT #0# 0
                (LIST '|TableAggregate| (|devaluate| |t#1|)
                      (|devaluate| |t#2|))))))) 
