
(/VERSIONCHECK 2) 

(DEFUN |QUEUE;enqueue!;S$S;1| (|e| |q| $)
  (SEQ
   (COND
    ((NULL (SPADCALL |q| (QREFELT $ 9)))
     (SPADCALL |q| (SPADCALL |e| (QREFELT $ 10)) (QREFELT $ 11)))
    ('T
     (SPADCALL (LAST (SPADCALL |q| (QREFELT $ 9))) '|rest|
               (SPADCALL |e| (QREFELT $ 10)) (QREFELT $ 13))))
   (EXIT |e|))) 

(DEFUN |QUEUE;insert!;S2$;2| (|e| |q| $)
  (SEQ (SPADCALL |e| |q| (QREFELT $ 14)) (EXIT |q|))) 

(DEFUN |QUEUE;dequeue!;$S;3| (|q| $)
  (PROG (|e|)
    (RETURN
     (SEQ
      (COND ((SPADCALL |q| (QREFELT $ 17)) (|error| "empty queue"))
            ('T
             (SEQ
              (LETT |e| (|SPADfirst| (SPADCALL |q| (QREFELT $ 9)))
                    |QUEUE;dequeue!;$S;3|)
              (SPADCALL |q| (CDR (SPADCALL |q| (QREFELT $ 9))) (QREFELT $ 11))
              (EXIT |e|)))))))) 

(DEFUN |QUEUE;extract!;$S;4| (|q| $) (SPADCALL |q| (QREFELT $ 18))) 

(DEFUN |QUEUE;rotate!;2$;5| (|q| $)
  (SEQ
   (COND ((SPADCALL |q| (QREFELT $ 17)) |q|)
         ('T
          (SEQ (SPADCALL (SPADCALL |q| (QREFELT $ 18)) |q| (QREFELT $ 14))
               (EXIT |q|)))))) 

(DEFUN |QUEUE;length;$Nni;6| (|q| $) (LENGTH (SPADCALL |q| (QREFELT $ 9)))) 

(DEFUN |QUEUE;front;$S;7| (|q| $)
  (COND ((SPADCALL |q| (QREFELT $ 17)) (|error| "empty queue"))
        ('T (|SPADfirst| (SPADCALL |q| (QREFELT $ 9)))))) 

(DEFUN |QUEUE;inspect;$S;8| (|q| $) (SPADCALL |q| (QREFELT $ 23))) 

(DEFUN |QUEUE;back;$S;9| (|q| $)
  (COND ((SPADCALL |q| (QREFELT $ 17)) (|error| "empty queue"))
        ('T (SPADCALL (SPADCALL |q| (QREFELT $ 9)) (QREFELT $ 25))))) 

(DEFUN |QUEUE;queue;L$;10| (|q| $)
  (SPADCALL (SPADCALL |q| (QREFELT $ 27)) (QREFELT $ 28))) 

(DEFUN |Queue| (#1=#:G688)
  (PROG ()
    (RETURN
     (PROG (#2=#:G689)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache| '|Queue|)
                                           '|domainEqualList|)
                . #3=(|Queue|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT (PROG1 (|Queue;| #1#) (LETT #2# T . #3#))
            (COND ((NOT #2#) (HREM |$ConstructorCache| '|Queue|))))))))))) 

(DEFUN |Queue;| (|#1|)
  (PROG (|pv$| #1=#:G687 $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #2=(|Queue|))
      (LETT |dv$| (LIST '|Queue| DV$1) . #2#)
      (LETT $ (GETREFV 37) . #2#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (LETT #1#
                                                (|HasCategory| |#1|
                                                               '(|SetCategory|))
                                                . #2#)
                                          (AND #1#
                                               (|HasCategory| |#1|
                                                              (LIST '|Evalable|
                                                                    (|devaluate|
                                                                     |#1|))))))
                      . #2#))
      (|haddProp| |$ConstructorCache| '|Queue| (LIST DV$1) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (AND (|HasCategory| $ '(|shallowlyMutable|)) (|augmentPredVector| $ 4))
      (AND (|HasCategory| $ '(|finiteAggregate|)) (|augmentPredVector| $ 8))
      (AND (|HasCategory| $ '(|finiteAggregate|)) #1#
           (|augmentPredVector| $ 16))
      (QSETREFV $ 7 (|Reference| (|List| |#1|)))
      $)))) 

(MAKEPROP '|Queue| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|Stack| 6) (|local| |#1|) '|Rep| (|List| 6)
              (0 . |deref|) (5 . |list|) (10 . |setref|) '"rest"
              (16 . |setelt|) |QUEUE;enqueue!;S$S;1| |QUEUE;insert!;S2$;2|
              (|Boolean|) (23 . |empty?|) |QUEUE;dequeue!;$S;3|
              |QUEUE;extract!;$S;4| |QUEUE;rotate!;2$;5| (|NonNegativeInteger|)
              |QUEUE;length;$Nni;6| |QUEUE;front;$S;7| |QUEUE;inspect;$S;8|
              (28 . |last|) |QUEUE;back;$S;9| (33 . |copy|) (38 . |ref|)
              |QUEUE;queue;L$;10| (|Equation| 6) (|List| 30) (|Mapping| 16 6)
              (|Mapping| 6 6) (|OutputForm|) (|String|) (|SingleInteger|))
           '#(~= 43 |size?| 49 |sample| 55 |rotate!| 59 |queue| 64 |parts| 69
              |more?| 74 |members| 80 |member?| 85 |map!| 91 |map| 97 |less?|
              103 |length| 109 |latex| 114 |inspect| 119 |insert!| 124 |hash|
              130 |front| 135 |extract!| 140 |every?| 145 |eval| 151 |eq?| 177
              |enqueue!| 183 |empty?| 189 |empty| 194 |dequeue!| 198 |count|
              203 |copy| 215 |coerce| 220 |bag| 225 |back| 230 |any?| 235 = 241
              |#| 247)
           'NIL
           (CONS (|makeByteWordVec2| 2 '(0 0 0 0 2 1 0 0 0 2 1 1))
                 (CONS
                  '#(NIL |BagAggregate&| |HomogeneousAggregate&| |Aggregate&|
                     |Evalable&| |SetCategory&| NIL NIL NIL |InnerEvalable&|
                     |BasicType&| NIL)
                  (CONS
                   '#((|QueueAggregate| 6) (|BagAggregate| 6)
                      (|HomogeneousAggregate| 6) (|Aggregate|) (|Evalable| 6)
                      (|SetCategory|) (|Type|) (|finiteAggregate|)
                      (|shallowlyMutable|) (|InnerEvalable| 6 6) (|BasicType|)
                      (|CoercibleTo| 34))
                   (|makeByteWordVec2| 36
                                       '(1 7 8 0 9 1 8 0 6 10 2 7 8 0 8 11 3 8
                                         0 0 12 0 13 1 0 16 0 17 1 8 6 0 25 1 8
                                         0 0 27 1 7 0 8 28 2 1 16 0 0 1 2 0 16
                                         0 21 1 0 0 0 1 1 0 0 0 20 1 0 0 8 29 1
                                         4 8 0 1 2 0 16 0 21 1 1 4 8 0 1 2 5 16
                                         6 0 1 2 3 0 33 0 1 2 0 0 33 0 1 2 0 16
                                         0 21 1 1 0 21 0 22 1 1 35 0 1 1 0 6 0
                                         24 2 0 0 6 0 15 1 1 36 0 1 1 0 6 0 23
                                         1 0 6 0 19 2 4 16 32 0 1 3 2 0 0 8 8 1
                                         2 2 0 0 30 1 3 2 0 0 6 6 1 2 2 0 0 31
                                         1 2 0 16 0 0 1 2 0 6 6 0 14 1 0 16 0
                                         17 0 0 0 1 1 0 6 0 18 2 5 21 6 0 1 2 4
                                         21 32 0 1 1 0 0 0 1 1 1 34 0 1 1 0 0 8
                                         1 1 0 6 0 26 2 4 16 32 0 1 2 1 16 0 0
                                         1 1 4 21 0 1)))))
           '|lookupComplete|)) 
