aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/LNAGG.lsp
blob: ce7cf516779b39e284d3c6cb81d246baf37cb9ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(/VERSIONCHECK 2) 

(DEFPARAMETER |LinearAggregate;CAT| 'NIL) 

(DEFPARAMETER |LinearAggregate;AL| 'NIL) 

(DEFUN |LinearAggregate;| (|t#1|)
  (PROG (#0=#:G1399)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                       (|sublisV|
                           (PAIR '(#1=#:G1397 #2=#:G1398)
                                 (LIST '(|Integer|)
                                       '(|UniversalSegment|
                                         (|Integer|))))
                           (COND
                             (|LinearAggregate;CAT|)
                             ('T
                              (LETT |LinearAggregate;CAT|
                                    (|Join|
                                     (|IndexedAggregate| '#1# '|t#1|)
                                     (|Collection| '|t#1|)
                                     (|Eltable| '#2# '$)
                                     (|mkCategory| '|domain|
                                      '(((|new|
                                          ($ (|NonNegativeInteger|)
                                           |t#1|))
                                         T)
                                        ((|concat| ($ $ |t#1|)) T)
                                        ((|concat| ($ |t#1| $)) T)
                                        ((|concat| ($ $ $)) T)
                                        ((|concat| ($ (|List| $))) T)
                                        ((|map|
                                          ($
                                           (|Mapping| |t#1| |t#1|
                                            |t#1|)
                                           $ $))
                                         T)
                                        ((|delete| ($ $ (|Integer|)))
                                         T)
                                        ((|delete|
                                          ($ $
                                           (|UniversalSegment|
                                            (|Integer|))))
                                         T)
                                        ((|insert|
                                          ($ |t#1| $ (|Integer|)))
                                         T)
                                        ((|insert| ($ $ $ (|Integer|)))
                                         T)
                                        ((|setelt|
                                          (|t#1| $
                                           (|UniversalSegment|
                                            (|Integer|))
                                           |t#1|))
                                         (|has| $
                                          (ATTRIBUTE
                                           |shallowlyMutable|))))
                                      NIL
                                      '((|UniversalSegment|
                                         (|Integer|))
                                        (|Integer|) (|List| $)
                                        (|NonNegativeInteger|))
                                      NIL))
                                    . #3=(|LinearAggregate|)))))) . #3#)
        (|setShellEntry| #0# 0
            (LIST '|LinearAggregate| (|devaluate| |t#1|))))))) 

(DEFUN |LinearAggregate| (#0=#:G1400)
  (LET (#1=#:G1401)
    (COND
      ((SETQ #1# (|assoc| (|devaluate| #0#) |LinearAggregate;AL|))
       (CDR #1#))
      (T (SETQ |LinearAggregate;AL|
               (|cons5| (CONS (|devaluate| #0#)
                              (SETQ #1# (|LinearAggregate;| #0#)))
                        |LinearAggregate;AL|))
         #1#))))