aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/URAGG.lsp
blob: f43f88c776c1b2f690dddecc4953b9a10b4c9e85 (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
82
83
84
85
86
87
88
89
90
91
(/VERSIONCHECK 2) 

(DEFPARAMETER |UnaryRecursiveAggregate;CAT| 'NIL) 

(DEFPARAMETER |UnaryRecursiveAggregate;AL| 'NIL) 

(DEFUN |UnaryRecursiveAggregate;| (|t#1|)
  (LET ((#0=#:G1400
            (|sublisV| (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                (COND
                  (|UnaryRecursiveAggregate;CAT|)
                  (T (SETQ |UnaryRecursiveAggregate;CAT|
                           (|Join| (|RecursiveAggregate| '|t#1|)
                                   (|mkCategory| '|domain|
                                    '(((|concat| ($ $ $)) T)
                                      ((|concat| ($ |t#1| $)) T)
                                      ((|first| (|t#1| $)) T)
                                      ((|elt| (|t#1| $ "first")) T)
                                      ((|first|
                                        ($ $ (|NonNegativeInteger|)))
                                       T)
                                      ((|rest| ($ $)) T)
                                      ((|elt| ($ $ "rest")) T)
                                      ((|rest|
                                        ($ $ (|NonNegativeInteger|)))
                                       T)
                                      ((|last| (|t#1| $)) T)
                                      ((|elt| (|t#1| $ "last")) T)
                                      ((|last|
                                        ($ $ (|NonNegativeInteger|)))
                                       T)
                                      ((|tail| ($ $)) T)
                                      ((|second| (|t#1| $)) T)
                                      ((|third| (|t#1| $)) T)
                                      ((|cycleEntry| ($ $)) T)
                                      ((|cycleLength|
                                        ((|NonNegativeInteger|) $))
                                       T)
                                      ((|cycleTail| ($ $)) T)
                                      ((|concat!| ($ $ $))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|concat!| ($ $ |t#1|))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|cycleSplit!| ($ $))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|setfirst!| (|t#1| $ |t#1|))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|setelt|
                                        (|t#1| $ "first" |t#1|))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|setrest!| ($ $ $))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|setelt| ($ $ "rest" $))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|setlast!| (|t#1| $ |t#1|))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|setelt|
                                        (|t#1| $ "last" |t#1|))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|)))
                                      ((|split!| ($ $ (|Integer|)))
                                       (|has| $
                                        (ATTRIBUTE |shallowlyMutable|))))
                                    NIL
                                    '((|Integer|)
                                      (|NonNegativeInteger|))
                                    NIL))))))))
    (|setShellEntry| #0# 0
        (LIST '|UnaryRecursiveAggregate| (|devaluate| |t#1|)))
    #0#)) 

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