
(/VERSIONCHECK 2) 

(DEFPARAMETER |DoublyLinkedAggregate;CAT| 'NIL) 

(DEFPARAMETER |DoublyLinkedAggregate;AL| 'NIL) 

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

(DEFUN |DoublyLinkedAggregate;| (|t#1|)
  (PROG (#0=#:G1815)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                       (COND
                         (|DoublyLinkedAggregate;CAT|)
                         ('T
                          (LETT |DoublyLinkedAggregate;CAT|
                                (|Join| (|RecursiveAggregate| '|t#1|)
                                        (|mkCategory| '|domain|
                                         '(((|last| (|t#1| $)) T)
                                           ((|head| ($ $)) T)
                                           ((|tail| ($ $)) T)
                                           ((|previous| ($ $)) T)
                                           ((|next| ($ $)) T)
                                           ((|concat!| ($ $ $))
                                            (|has| $
                                             (|shallowlyMutable|)))
                                           ((|setprevious!| ($ $ $))
                                            (|has| $
                                             (|shallowlyMutable|)))
                                           ((|setnext!| ($ $ $))
                                            (|has| $
                                             (|shallowlyMutable|))))
                                         NIL 'NIL NIL))
                                . #1=(|DoublyLinkedAggregate|))))) . #1#)
        (SETELT #0# 0
                (LIST '|DoublyLinkedAggregate| (|devaluate| |t#1|))))))) 
