aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/CLAGG.lsp
blob: 8524691905383a403c1a13831058b4d066c408db (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
(/VERSIONCHECK 2) 

(DEFPARAMETER |Collection;CAT| 'NIL) 

(DEFPARAMETER |Collection;AL| 'NIL) 

(DEFUN |Collection;| (|t#1|)
  (LET ((#0=#:G1372
            (|sublisV| (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                (COND
                  (|Collection;CAT|)
                  (T (SETQ |Collection;CAT|
                           (|Join| (|HomogeneousAggregate| '|t#1|)
                                   (|mkCategory| '|domain|
                                    '(((|construct| ($ (|List| |t#1|)))
                                       T)
                                      ((|find|
                                        ((|Union| |t#1| "failed")
                                         (|Mapping| (|Boolean|) |t#1|)
                                         $))
                                       T)
                                      ((|reduce|
                                        (|t#1|
                                         (|Mapping| |t#1| |t#1| |t#1|)
                                         $))
                                       (|has| $
                                        (ATTRIBUTE |finiteAggregate|)))
                                      ((|reduce|
                                        (|t#1|
                                         (|Mapping| |t#1| |t#1| |t#1|)
                                         $ |t#1|))
                                       (|has| $
                                        (ATTRIBUTE |finiteAggregate|)))
                                      ((|remove|
                                        ($
                                         (|Mapping| (|Boolean|) |t#1|)
                                         $))
                                       (|has| $
                                        (ATTRIBUTE |finiteAggregate|)))
                                      ((|select|
                                        ($
                                         (|Mapping| (|Boolean|) |t#1|)
                                         $))
                                       (|has| $
                                        (ATTRIBUTE |finiteAggregate|)))
                                      ((|reduce|
                                        (|t#1|
                                         (|Mapping| |t#1| |t#1| |t#1|)
                                         $ |t#1| |t#1|))
                                       (AND
                                        (|has| |t#1| (|SetCategory|))
                                        (|has| $
                                         (ATTRIBUTE |finiteAggregate|))))
                                      ((|remove| ($ |t#1| $))
                                       (AND
                                        (|has| |t#1| (|SetCategory|))
                                        (|has| $
                                         (ATTRIBUTE |finiteAggregate|))))
                                      ((|removeDuplicates| ($ $))
                                       (AND
                                        (|has| |t#1| (|SetCategory|))
                                        (|has| $
                                         (ATTRIBUTE |finiteAggregate|)))))
                                    '(((|ConvertibleTo| (|InputForm|))
                                       (|has| |t#1|
                                        (|ConvertibleTo| (|InputForm|)))))
                                    '((|List| |t#1|)) NIL))))))))
    (|setShellEntry| #0# 0 (LIST '|Collection| (|devaluate| |t#1|)))
    #0#)) 

(DEFUN |Collection| (#0=#:G1373)
  (LET ((#1=#:G1374 (|assoc| (|devaluate| #0#) |Collection;AL|)))
    (COND
      (#1# (CDR #1#))
      (T (PROGN
           (SETQ #1# (|Collection;| #0#))
           (SETQ |Collection;AL|
                 (|cons5| (CONS (|devaluate| #0#) #1#) |Collection;AL|))
           #1#)))))