
(/VERSIONCHECK 2) 

(DEFPARAMETER |IndexedAggregate;CAT| 'NIL) 

(DEFPARAMETER |IndexedAggregate;AL| 'NIL) 

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

(DEFUN |IndexedAggregate;| (|t#1| |t#2|)
  (PROG (#0=#:G1818)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)))
                       (COND
                         (|IndexedAggregate;CAT|)
                         ('T
                          (LETT |IndexedAggregate;CAT|
                                (|Join| (|HomogeneousAggregate| '|t#2|)
                                        (|EltableAggregate| '|t#1|
                                         '|t#2|)
                                        (|mkCategory| '|domain|
                                         '(((|entries|
                                             ((|List| |t#2|) $))
                                            T)
                                           ((|index?|
                                             ((|Boolean|) |t#1| $))
                                            T)
                                           ((|indices|
                                             ((|List| |t#1|) $))
                                            T)
                                           ((|entry?|
                                             ((|Boolean|) |t#2| $))
                                            (AND
                                             (|has| $
                                              (|finiteAggregate|))
                                             (|has| |t#2|
                                              (|SetCategory|))))
                                           ((|maxIndex| (|t#1| $))
                                            (|has| |t#1|
                                             (|OrderedSet|)))
                                           ((|minIndex| (|t#1| $))
                                            (|has| |t#1|
                                             (|OrderedSet|)))
                                           ((|first| (|t#2| $))
                                            (|has| |t#1|
                                             (|OrderedSet|)))
                                           ((|fill!| ($ $ |t#2|))
                                            (|has| $
                                             (|shallowlyMutable|)))
                                           ((|swap!|
                                             ((|Void|) $ |t#1| |t#1|))
                                            (|has| $
                                             (|shallowlyMutable|))))
                                         NIL
                                         '((|Void|) (|Boolean|)
                                           (|List| |t#1|)
                                           (|List| |t#2|))
                                         NIL))
                                . #1=(|IndexedAggregate|))))) . #1#)
        (SETELT #0# 0
                (LIST '|IndexedAggregate| (|devaluate| |t#1|)
                      (|devaluate| |t#2|))))))) 
