aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/ALAGG.lsp
blob: 59eceb448ae8e896e9f3cd33e49bbdf39e616180 (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
(/VERSIONCHECK 2) 

(DEFPARAMETER |AssociationListAggregate;CAT| 'NIL) 

(DEFPARAMETER |AssociationListAggregate;AL| 'NIL) 

(DEFUN |AssociationListAggregate;| (|t#1| |t#2|)
  (PROG (#0=#:G1400)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)))
                       (|sublisV|
                           (PAIR '(#1=#:G1399)
                                 (LIST '(|Record| (|:| |key| |t#1|)
                                         (|:| |entry| |t#2|))))
                           (COND
                             (|AssociationListAggregate;CAT|)
                             ('T
                              (LETT |AssociationListAggregate;CAT|
                                    (|Join|
                                     (|TableAggregate| '|t#1| '|t#2|)
                                     (|ListAggregate| '#1#)
                                     (|mkCategory| '|domain|
                                      '(((|assoc|
                                          ((|Union|
                                            (|Record| (|:| |key| |t#1|)
                                             (|:| |entry| |t#2|))
                                            "failed")
                                           |t#1| $))
                                         T))
                                      NIL 'NIL NIL))
                                    . #2=(|AssociationListAggregate|)))))) . #2#)
        (|setShellEntry| #0# 0
            (LIST '|AssociationListAggregate| (|devaluate| |t#1|)
                  (|devaluate| |t#2|))))))) 

(DEFUN |AssociationListAggregate| (&REST #0=#:G1403 &AUX #1=#:G1401)
  (DSETQ #1# #0#)
  (LET (#2=#:G1402)
    (COND
      ((SETQ #2#
             (|assoc| (|devaluateList| #1#)
                      |AssociationListAggregate;AL|))
       (CDR #2#))
      (T (SETQ |AssociationListAggregate;AL|
               (|cons5| (CONS (|devaluateList| #1#)
                              (SETQ #2#
                                    (APPLY
                                     #'|AssociationListAggregate;| #1#)))
                        |AssociationListAggregate;AL|))
         #2#))))