
(/VERSIONCHECK 2) 

(DEFPARAMETER |RecursiveAggregate;CAT| 'NIL) 

(DEFPARAMETER |RecursiveAggregate;AL| 'NIL) 

(DEFUN |RecursiveAggregate| (#1=#:G1793)
  (LET (#2=#:G1794)
    (COND
     ((SETQ #2# (|assoc| #3=(|devaluate| #1#) |RecursiveAggregate;AL|))
      (CDR #2#))
     (T
      (SETQ |RecursiveAggregate;AL|
              (|cons5| (CONS #3# (SETQ #2# (|RecursiveAggregate;| #1#)))
                       |RecursiveAggregate;AL|))
      #2#)))) 

(DEFUN |RecursiveAggregate;| (|t#1|)
  (PROG (#1=#:G1792)
    (RETURN
     (PROG1
         (LETT #1#
               (|sublisV| (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                          (COND (|RecursiveAggregate;CAT|)
                                ('T
                                 (LETT |RecursiveAggregate;CAT|
                                       (|Join| (|HomogeneousAggregate| '|t#1|)
                                               (|mkCategory| '|domain|
                                                             '(((|children|
                                                                 ((|List| $)
                                                                  $))
                                                                T)
                                                               ((|nodes|
                                                                 ((|List| $)
                                                                  $))
                                                                T)
                                                               ((|leaf?|
                                                                 ((|Boolean|)
                                                                  $))
                                                                T)
                                                               ((|value|
                                                                 (|t#1| $))
                                                                T)
                                                               ((|elt|
                                                                 (|t#1| $
                                                                  "value"))
                                                                T)
                                                               ((|cyclic?|
                                                                 ((|Boolean|)
                                                                  $))
                                                                T)
                                                               ((|leaves|
                                                                 ((|List|
                                                                   |t#1|)
                                                                  $))
                                                                T)
                                                               ((|distance|
                                                                 ((|Integer|) $
                                                                  $))
                                                                T)
                                                               ((|child?|
                                                                 ((|Boolean|) $
                                                                  $))
                                                                (|has| |t#1|
                                                                       (|SetCategory|)))
                                                               ((|node?|
                                                                 ((|Boolean|) $
                                                                  $))
                                                                (|has| |t#1|
                                                                       (|SetCategory|)))
                                                               ((|setchildren!|
                                                                 ($ $
                                                                  (|List| $)))
                                                                (|has| $
                                                                       (|shallowlyMutable|)))
                                                               ((|setelt|
                                                                 (|t#1| $
                                                                  "value"
                                                                  |t#1|))
                                                                (|has| $
                                                                       (|shallowlyMutable|)))
                                                               ((|setvalue!|
                                                                 (|t#1| $
                                                                  |t#1|))
                                                                (|has| $
                                                                       (|shallowlyMutable|))))
                                                             NIL
                                                             '((|List| $)
                                                               (|Boolean|)
                                                               (|Integer|)
                                                               (|List| |t#1|))
                                                             NIL))
                                       . #2=(|RecursiveAggregate|)))))
               . #2#)
       (SETELT #1# 0 (LIST '|RecursiveAggregate| (|devaluate| |t#1|))))))) 
