git.fiddlerwoaroof.com
Browse code

make gh-pages branch

Ed Langley authored on 30/04/2019 06:47:55
Showing 98 changed files
1 1
similarity index 100%
2 2
rename from docs/Concept-index.html
3 3
rename to Concept-index.html
4 4
similarity index 100%
5 5
rename from docs/Data-type-index.html
6 6
rename to Data-type-index.html
7 7
similarity index 100%
8 8
rename from docs/Definitions.html
9 9
rename to Definitions.html
10 10
similarity index 100%
11 11
rename from docs/Exported-definitions.html
12 12
rename to Exported-definitions.html
13 13
similarity index 100%
14 14
rename from docs/Exported-functions.html
15 15
rename to Exported-functions.html
16 16
similarity index 100%
17 17
rename from docs/Exported-generic-functions.html
18 18
rename to Exported-generic-functions.html
19 19
similarity index 100%
20 20
rename from docs/Exported-macros.html
21 21
rename to Exported-macros.html
22 22
similarity index 100%
23 23
rename from docs/Files.html
24 24
rename to Files.html
25 25
similarity index 100%
26 26
rename from docs/Function-index.html
27 27
rename to Function-index.html
28 28
similarity index 100%
29 29
rename from docs/Indexes.html
30 30
rename to Indexes.html
31 31
similarity index 100%
32 32
rename from docs/Internal-classes.html
33 33
rename to Internal-classes.html
34 34
similarity index 100%
35 35
rename from docs/Internal-definitions.html
36 36
rename to Internal-definitions.html
37 37
similarity index 100%
38 38
rename from docs/Internal-functions.html
39 39
rename to Internal-functions.html
40 40
similarity index 100%
41 41
rename from docs/Internal-generic-functions.html
42 42
rename to Internal-generic-functions.html
43 43
similarity index 100%
44 44
rename from docs/Internal-macros.html
45 45
rename to Internal-macros.html
46 46
similarity index 100%
47 47
rename from docs/Lisp-files.html
48 48
rename to Lisp-files.html
49 49
similarity index 100%
50 50
rename from docs/Packages.html
51 51
rename to Packages.html
52 52
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-* Intro
2
-
3
-This library provides a language for expressing data manipulations as
4
-the composition of more primitive operations.
5
-
6
-#+BEGIN_SRC lisp
7
-  DATA-LENS> (funcall (on (alexandria:compose
8
-                           (over (transform-tail (over (slice 1))))
9
-                           (compress-runs :collector 'combine-matching-lists))
10
-                          (alexandria:compose 
11
-                           (over (juxt (element 0)
12
-                                       'identity))
13
-                           (sorted 'char<
14
-                                   :key (element 0))))
15
-                      '("January" "February" "March" "April"
16
-                        "May" "June" "July" "August"
17
-                        "September" "October" "November" "December"))
18
-  #| ==> ((#\A "pril" "ugust")
19
-          (#\D "ecember")
20
-          (#\F "ebruary")
21
-          (#\J "anuary" "une" "uly")
22
-          (#\M "arch" "ay")
23
-          (#\N "ovember")
24
-          (#\O "ctober")
25
-          (#\S "eptember")) |#
26
-#+END_SRC
27 0
similarity index 100%
28 1
rename from docs/Systems.html
29 2
rename to Systems.html
30 3
similarity index 100%
31 4
rename from docs/The-data_002dlens-package.html
32 5
rename to The-data_002dlens-package.html
33 6
similarity index 100%
34 7
rename from docs/The-data_002dlens-system.html
35 8
rename to The-data_002dlens-system.html
36 9
similarity index 100%
37 10
rename from docs/The-data_002dlens_002flens_003cdot_003elisp-file.html
38 11
rename to The-data_002dlens_002flens_003cdot_003elisp-file.html
39 12
similarity index 100%
40 13
rename from docs/The-data_002dlens_003cdot_003easd-file.html
41 14
rename to The-data_002dlens_003cdot_003easd-file.html
42 15
similarity index 100%
43 16
rename from docs/The-data_002dlens_003cdot_003elenses-package.html
44 17
rename to The-data_002dlens_003cdot_003elenses-package.html
45 18
similarity index 100%
46 19
rename from docs/Variable-index.html
47 20
rename to Variable-index.html
48 21
deleted file mode 100644
... ...
@@ -1,10 +0,0 @@
1
-(asdf:defsystem #:data-lens
2
-  :description "Utilities for building data transormations from composable functions, modeled on lenses and transducers"
3
-  :author "Edward Langley <el-cl@elangley.org>"
4
-  :license "MIT"
5
-  :depends-on (:cl-ppcre
6
-               :alexandria
7
-               :serapeum)
8
-  :serial t
9
-  :components ((:file "lens")))
10
-
11 0
similarity index 100%
12 1
rename from docs/data-lens.texi
13 2
rename to data-lens.texi
14 3
similarity index 100%
15 4
rename from docs/go-to-the-DATA_002dLENS-package.html
16 5
rename to go-to-the-DATA_002dLENS-package.html
17 6
similarity index 100%
18 7
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eAPPLICABLE_002dWHEN-function.html
19 8
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eAPPLICABLE_002dWHEN-function.html
20 9
similarity index 100%
21 10
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eAPPLYING-macro.html
22 11
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eAPPLYING-macro.html
23 12
similarity index 100%
24 13
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCOMBINE_002dMATCHING_002dLISTS-function.html
25 14
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCOMBINE_002dMATCHING_002dLISTS-function.html
26 15
similarity index 100%
27 16
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCOMPRESS_002dRUNS-function.html
28 17
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCOMPRESS_002dRUNS-function.html
29 18
similarity index 100%
30 19
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCONS_002dNEW-function.html
31 20
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCONS_002dNEW-function.html
32 21
similarity index 100%
33 22
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCUMSUM-function.html
34 23
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eCUMSUM-function.html
35 24
similarity index 100%
36 25
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDEDUPLICATE-function.html
37 26
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDEDUPLICATE-function.html
38 27
similarity index 100%
39 28
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDEFUN_002dCT-macro.html
40 29
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDEFUN_002dCT-macro.html
41 30
similarity index 100%
42 31
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDENEST-function.html
43 32
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDENEST-function.html
44 33
similarity index 100%
45 34
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDERIVE-function.html
46 35
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eDERIVE-function.html
47 36
similarity index 100%
48 37
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eELEMENT-function.html
49 38
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eELEMENT-function.html
50 39
similarity index 100%
51 40
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXCLUDE-function.html
52 41
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXCLUDE-function.html
53 42
similarity index 100%
54 43
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXTRACT_002dKEY-COMMON_002dLISP_003ccolon_003e_003ccolon_003eHASH_002dTABLE-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-method.html
55 44
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXTRACT_002dKEY-COMMON_002dLISP_003ccolon_003e_003ccolon_003eHASH_002dTABLE-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-method.html
56 45
similarity index 100%
57 46
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXTRACT_002dKEY-COMMON_002dLISP_003ccolon_003e_003ccolon_003eLIST-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-method.html
58 47
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXTRACT_002dKEY-COMMON_002dLISP_003ccolon_003e_003ccolon_003eLIST-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-method.html
59 48
similarity index 100%
60 49
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXTRACT_002dKEY-generic-function.html
61 50
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eEXTRACT_002dKEY-generic-function.html
62 51
similarity index 100%
63 52
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eFILLER-function.html
64 53
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eFILLER-function.html
65 54
similarity index 100%
66 55
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eINCLUDE-function.html
67 56
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eINCLUDE-function.html
68 57
similarity index 100%
69 58
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eJUXT-function.html
70 59
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eJUXT-function.html
71 60
similarity index 100%
72 61
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eKEY-function.html
73 62
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eKEY-function.html
74 63
similarity index 100%
75 64
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eKEY_002dTRANSFORM-function.html
76 65
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eKEY_002dTRANSFORM-function.html
77 66
similarity index 100%
78 67
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eLET_002dFN-macro.html
79 68
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eLET_002dFN-macro.html
80 69
similarity index 100%
81 70
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eMATCHING_002dLIST_002dREDUCER-function.html
82 71
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eMATCHING_002dLIST_002dREDUCER-function.html
83 72
similarity index 100%
84 73
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eMAXIMIZING-function.html
85 74
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eMAXIMIZING-function.html
86 75
similarity index 100%
87 76
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOF_002dLENGTH-function.html
88 77
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOF_002dLENGTH-function.html
89 78
similarity index 100%
90 79
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOF_002dMAX_002dLENGTH-function.html
91 80
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOF_002dMAX_002dLENGTH-function.html
92 81
similarity index 100%
93 82
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOF_002dMIN_002dLENGTH-function.html
94 83
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOF_002dMIN_002dLENGTH-function.html
95 84
similarity index 100%
96 85
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eON-function.html
97 86
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eON-function.html
98 87
similarity index 100%
99 88
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOVER-function.html
100 89
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eOVER-function.html
101 90
similarity index 100%
102 91
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003ePICK-function.html
103 92
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003ePICK-function.html
104 93
similarity index 100%
105 94
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eREGEX_002dMATCH-function.html
106 95
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eREGEX_002dMATCH-function.html
107 96
similarity index 100%
108 97
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSHORTCUT-macro.html
109 98
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSHORTCUT-macro.html
110 99
similarity index 100%
111 100
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSLICE-function.html
112 101
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSLICE-function.html
113 102
similarity index 100%
114 103
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSORTED-function.html
115 104
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSORTED-function.html
116 105
similarity index 100%
117 106
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSPLICE_002dELT-function.html
118 107
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eSPLICE_002dELT-function.html
119 108
similarity index 100%
120 109
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eTRANSFORM_002dELT-function.html
121 110
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eTRANSFORM_002dELT-function.html
122 111
similarity index 100%
123 112
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eTRANSFORM_002dHEAD-function.html
124 113
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eTRANSFORM_002dHEAD-function.html
125 114
similarity index 100%
126 115
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eTRANSFORM_002dTAIL-function.html
127 116
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eTRANSFORM_002dTAIL-function.html
128 117
similarity index 100%
129 118
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eUPDATE-function.html
130 119
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eUPDATE-function.html
131 120
similarity index 100%
132 121
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eUPDATEF-macro.html
133 122
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eUPDATEF-macro.html
134 123
similarity index 100%
135 124
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eZIPPING-function.html
136 125
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003eZIPPING-function.html
137 126
similarity index 100%
138 127
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003e_003c_003e1-macro.html
139 128
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003e_003c_003e1-macro.html
140 129
similarity index 100%
141 130
rename from docs/go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003e_003d_003e_003e-function.html
142 131
rename to go-to-the-DATA_002dLENS_003ccolon_003e_003ccolon_003e_003d_003e_003e-function.html
143 132
similarity index 100%
144 133
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES-package.html
145 134
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES-package.html
146 135
similarity index 100%
147 136
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCLONE-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-AROUND-method.html
148 137
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCLONE-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-AROUND-method.html
149 138
similarity index 100%
150 139
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCLONE-generic-function.html
151 140
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCLONE-generic-function.html
152 141
similarity index 100%
153 142
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCONSTANT_002d-class.html
154 143
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCONSTANT_002d-class.html
155 144
similarity index 100%
156 145
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-COMMON_002dLISP_003ccolon_003e_003ccolon_003eLIST-method.html
157 146
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-COMMON_002dLISP_003ccolon_003e_003ccolon_003eLIST-method.html
158 147
similarity index 100%
159 148
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-COMMON_002dLISP_003ccolon_003e_003ccolon_003eVECTOR-method.html
160 149
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-COMMON_002dLISP_003ccolon_003e_003ccolon_003eVECTOR-method.html
161 150
similarity index 100%
162 151
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCONSTANT_002d-method.html
163 152
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCONSTANT_002d-method.html
164 153
similarity index 100%
165 154
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eIDENTITY_002d-method.html
166 155
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-COMMON_002dLISP_003ccolon_003e_003ccolon_003eT-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eIDENTITY_002d-method.html
167 156
similarity index 100%
168 157
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-generic-function.html
169 158
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eFMAP-generic-function.html
170 159
similarity index 100%
171 160
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eIDENTITY_002d-class.html
172 161
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eIDENTITY_002d-class.html
173 162
similarity index 100%
174 163
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dALIST_002dHISTORY_002dLENS-function.html
175 164
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dALIST_002dHISTORY_002dLENS-function.html
176 165
similarity index 100%
177 166
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dALIST_002dLENS-function.html
178 167
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dALIST_002dLENS-function.html
179 168
similarity index 100%
180 169
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dHASH_002dTABLE_002dLENS-function.html
181 170
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dHASH_002dTABLE_002dLENS-function.html
182 171
similarity index 100%
183 172
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dPLIST_002dLENS-function.html
184 173
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eMAKE_002dPLIST_002dLENS-function.html
185 174
similarity index 100%
186 175
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eOVER-function.html
187 176
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eOVER-function.html
188 177
similarity index 100%
189 178
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eSET-function.html
190 179
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eSET-function.html
191 180
similarity index 100%
192 181
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNCONSTANT-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCONSTANT_002d-method.html
193 182
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNCONSTANT-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eCONSTANT_002d-method.html
194 183
similarity index 100%
195 184
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNCONSTANT-generic-function.html
196 185
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNCONSTANT-generic-function.html
197 186
similarity index 100%
198 187
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNIDENTITY-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eIDENTITY_002d-method.html
199 188
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNIDENTITY-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eIDENTITY_002d-method.html
200 189
similarity index 100%
201 190
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNIDENTITY-generic-function.html
202 191
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eUNIDENTITY-generic-function.html
203 192
similarity index 100%
204 193
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eVIEW-function.html
205 194
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eVIEW-function.html
206 195
similarity index 100%
207 196
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eWRAP_002dCONSTANT-function.html
208 197
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eWRAP_002dCONSTANT-function.html
209 198
similarity index 100%
210 199
rename from docs/go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eWRAP_002dIDENTITY-function.html
211 200
rename to go-to-the-DATA_002dLENS_003cdot_003eLENSES_003ccolon_003e_003ccolon_003eWRAP_002dIDENTITY-function.html
212 201
similarity index 100%
213 202
rename from docs/go-to-the-data_002dlens-system.html
214 203
rename to go-to-the-data_002dlens-system.html
215 204
similarity index 100%
216 205
rename from docs/go-to-the-data_002dlens_002flens_003cdot_003elisp-file.html
217 206
rename to go-to-the-data_002dlens_002flens_003cdot_003elisp-file.html
218 207
similarity index 100%
219 208
rename from docs/go-to-the-data_002dlens_003cdot_003easd-file.html
220 209
rename to go-to-the-data_002dlens_003cdot_003easd-file.html
221 210
similarity index 100%
222 211
rename from docs/index.html
223 212
rename to index.html
224 213
deleted file mode 100644
... ...
@@ -1,515 +0,0 @@
1
-(defpackage :data-lens.lenses
2
-  (:shadow :set)
3
-  (:use :cl)
4
-  (:export :over :set :view :make-alist-lens :make-plist-lens :make-hash-table-lens))
5
-(in-package :data-lens.lenses)
6
-
7
-#+fw.dev
8
-(progn
9
-  ;; maybe functor implementation
10
-  (defclass maybe ()
11
-    ())
12
-  (defclass just (maybe)
13
-    ((%v :initarg :value :reader value)))
14
-  (defclass nothing (maybe)
15
-    ())
16
-
17
-  (defun just (value)
18
-    (make-instance 'just :value value))
19
-  (defun nothing (&optional value)
20
-    (declare (ignore value))
21
-    (make-instance 'nothing))
22
-
23
-  (defgeneric maybe (default value)
24
-    (:method (default (value just))
25
-      (value value))
26
-    (:method (default (value nothing))
27
-      default))
28
-
29
-  (defgeneric maybe-apply (function value)
30
-    (:method (function (value just))
31
-      (just (funcall function (value value))))
32
-    (:method (function (value nothing))
33
-      value))
34
-
35
-  (defmethod print-object ((o just) s)
36
-    (format s "#.(~s ~s)"
37
-            'just
38
-            (value o)))
39
-
40
-  (defmethod print-object ((o nothing) s)
41
-    (format s "#.(~s)"
42
-            'nothing)))
43
-
44
-;; identity functor, necessary for set and over
45
-(defclass identity- ()
46
-  ((%v :initarg :value :reader unidentity)))
47
-
48
-(defun wrap-identity (v)
49
-  (make-instance 'identity- :value v))
50
-
51
-(defmethod print-object ((o identity-) s)
52
-  (format s "#.(~s ~s)"
53
-          'wrap-identity
54
-          (unidentity o)))
55
-
56
-;; constant functor, necessary for view
57
-(defclass constant- ()
58
-  ((%v :initarg :value :reader unconstant)))
59
-
60
-(defun wrap-constant (v)
61
-  (make-instance 'constant- :value v))
62
-
63
-(defmethod print-object ((o constant-) s)
64
-  (format s "#.(~s ~s)"
65
-          'wrap-constant
66
-          (unconstant o)))
67
-
68
-(defgeneric fmap (function data)
69
-  (:method (function (data identity-))
70
-    (wrap-identity
71
-     (funcall function
72
-              (unidentity data))))
73
-  (:method (function (data constant-))
74
-    data)
75
-  (:method (function (data list))
76
-    (mapcar function data))
77
-  (:method (function (data vector))
78
-    (map 'vector function data))
79
-  #+fw.dev
80
-  (:method (function (data maybe))
81
-    (maybe-apply function data)))
82
-
83
-(defun over (lens cb rec)
84
-  "Given a lens, a callback and a record, apply the lens to the
85
-record, transform it by the callback and return copy of the record,
86
-updated to contain the result of the callback. This is the fundamental
87
-operation on a lens and SET and VIEW are implemented in terms of it.
88
-
89
-A lens is any function of the form (lambda (fun) (lambda (rec) ...))
90
-that obeys the lens laws (where == is some reasonable equality
91
-operator):
92
-
93
-    (== (view lens (set lens value rec))
94
-        value)
95
- 
96
-    (== (set lens (view lens rec) rec)
97
-        rec)
98
- 
99
-    (== (set lens value2 (set lens value1 rec))
100
-        (set lens value2 rec))
101
-
102
-The inner lambda returns a functor that determines the policy to be
103
-applied to the focused part.  By default, this only uses IDENTITY- and
104
-CONSTANT- in order to implement the lens operations over, set and
105
-view.
106
-
107
-If these conditions are met, (over (data-lens:<>1 lens1 lens2) ...) is
108
-equivalent to using lens2 to focus the part lens1 focuses: note that
109
-composition is \"backwards\" from what one might expect: this is
110
-because composition composes the wrapper lambdas and applies the
111
-lambda that actually pulls a value out of a record later."
112
-  (unidentity
113
-   (funcall (funcall lens (lambda (x) (wrap-identity (funcall cb x))))
114
-            rec)))
115
-
116
-(defun view (lens rec)
117
-  "Given a lens and a rec, return the focused value"
118
-  (unconstant
119
-   (funcall (funcall lens (lambda (x) (wrap-constant x)))
120
-            rec)))
121
-
122
-(defun set (lens v rec)
123
-  "Given a lens, a value and a rec, immutably update the rec to
124
-contain the new value at the location focused by the lens."
125
-  (unidentity
126
-   (funcall (funcall lens (lambda (_) _ (wrap-identity v)))
127
-            rec)))
128
-
129
-#+fw.dev
130
-(progn
131
-  ;; "fake" functors that don't assume a functor result to their
132
-  ;; callback
133
-  (defun over* (lens cb rec)
134
-    (funcall (funcall lens cb)
135
-             rec))
136
-
137
-  (defun set* (lens value rec)
138
-    (over lens
139
-          (lambda (_)
140
-            (declare (ignore _))
141
-            value)
142
-          rec))
143
-
144
-  (defun view* (lens rec)
145
-    (over lens
146
-          (lambda (value)
147
-            (return-from view*
148
-              value))
149
-          rec)))
150
-
151
-(defun make-alist-history-lens (key)
152
-  "A lens for updating a alist, preserving previous values"
153
-  (lambda (cb)
154
-    (lambda (alist)
155
-      (fmap (lambda (new)
156
-              (cons (cons key new)
157
-                    alist))
158
-            (funcall cb (serapeum:assocdr key alist))))))
159
-
160
-(defun make-alist-lens (key)
161
-  "A lens for updating a alist, discarding previous values"
162
-  (lambda (cb)
163
-    (lambda (alist)
164
-      (fmap (lambda (new)
165
-              (remove-duplicates (cons (cons key new)
166
-                                       alist)
167
-                                 :key #'car
168
-                                 :from-end t))
169
-            (funcall cb (serapeum:assocdr key alist))))))
170
-
171
-(defun make-plist-lens (key)
172
-  "A lens for updating a plist, preserving previous values"
173
-  (lambda (cb)
174
-    (lambda (plist)
175
-      (fmap (lambda (new)
176
-              (list* key new
177
-                     plist))
178
-            (funcall cb (getf plist key))))))
179
-
180
-(defun make-hash-table-lens (key)
181
-  "A lens for updating a hash-table, discarding previous values"
182
-  (lambda (cb)
183
-    (lambda (old-hash)
184
-      (fmap (lambda (new)
185
-              (let ((new-hash (alexandria:copy-hash-table old-hash)))
186
-                (prog1 new-hash
187
-                  (setf (gethash key new-hash)
188
-                        new))))
189
-            (funcall cb (gethash key old-hash))))))
190
-
191
-;; imagine a lens here that uses the MOP to immutably update a class...
192
-(defgeneric clone (obj &rest new-initargs &key)
193
-  (:method :around (obj &rest new-initargs &key)
194
-    (apply #'reinitialize-instance (call-next-method) new-initargs)))
195
-
196
-#+fw.demo
197
-(progn
198
-  (defclass foo ()
199
-    ((a :initarg :a :accessor a)))
200
-  (defmethod clone ((obj foo) &key)
201
-    (make-instance 'foo :a (a obj)))
202
-
203
-  ;;; needs to be updated for functor-based lens
204
-  (defun a-lens (cb)
205
-    (lambda (foo)
206
-      (fw.lu:prog1-bind (new (clone foo))
207
-        (setf (a new)
208
-              (funcall cb (a foo))))))
209
-  (view 'a-lens
210
-        (over 'a-lens '1+
211
-              (set 'a-lens 2
212
-                   (make-instance 'foo :a 1)))) #|
213
-  ==> 3 |#)
214
-
215
-
216
-
217
-(defpackage :data-lens
218
-  (:use :cl)
219
-  (:import-from #:serapeum #:op #:defalias)
220
-  (:export #:regex-match #:include #:exclude #:pick #:key-transform
221
-           #:combine #:derive #:cumsum #:over #:on #:shortcut #:defun-ct #:key
222
-           #:extract-key #:element #:let-fn #:juxt #:transform-tail #:slice
223
-           #:compress-runs #:combine-matching-lists #:sorted #:applicable-when
224
-           #:of-length #:of-min-length #:of-max-length #:transform-head
225
-           #:maximizing #:zipping #:applying #:splice-elt #:transform-elt #:denest
226
-           #:op #:defalias #:<> #:<>1))
227
-(in-package :data-lens)
228
-
229
-
230
-(declaim 
231
- (inline data-lens:over data-lens:transform-tail
232
-         data-lens:applicable-when data-lens:of-min-length
233
-         data-lens:on data-lens:over data-lens:slice
234
-         data-lens:compress-runs data-lens:combine-matching-lists
235
-         data-lens:juxt data-lens:element data-lens:sorted))
236
-
237
-;;; TODO: consider making this wrap defalias?
238
-(defmacro shortcut (name function &body bound-args)
239
-  `(eval-when (:load-toplevel :compile-toplevel :execute)
240
-     (setf (fdefinition ',name)
241
-           (,function ,@bound-args))))
242
-
243
-(defmacro defun-ct (name (&rest args) &body body)
244
-  `(eval-when (:load-toplevel :compile-toplevel :execute)
245
-     (defun ,name ,args
246
-       ,@body)))
247
-
248
-(defmacro let-fn ((&rest bindings) &body body)
249
-  (let ((binding-forms (mapcar (lambda (form)
250
-                                 `(,(car form) ,(cadr form)
251
-                                   (funcall ,@(cddr form) ,@(cadr form))))
252
-                               bindings)))
253
-    `(labels ,binding-forms
254
-       ,@body)))
255
-
256
-(defgeneric extract-key (map key)
257
-  (:method ((map hash-table) key)
258
-    (gethash key map))
259
-  (:method ((map list) key)
260
-    (typecase (car map)
261
-      (cons (cdr (assoc key map :test 'equal)))
262
-      (t (loop for (a-key . value) on map by #'cddr
263
-               when (equal key a-key) do
264
-                 (return (car value)))))))
265
-
266
-(defun-ct deduplicate (&optional (test 'eql))
267
-  (lambda (it)
268
-    (remove-duplicates it :test test)))
269
-
270
-(defun cons-new (&key (test 'eql) (key 'identity))
271
-  (lambda (acc next)
272
-    (if (and acc
273
-             (funcall test
274
-                      (funcall key (car acc))
275
-                      (funcall key next)))
276
-        acc
277
-        (cons next acc))))
278
-
279
-(defun matching-list-reducer (test acc next)
280
-  (if (and acc
281
-           (funcall test (caar acc) (car next)))
282
-      (cons (cons (caar acc)
283
-                  (append (cdar acc)
284
-                          (cdr next)))
285
-            (cdr acc))
286
-      (cons next acc)))
287
-
288
-(defun combine-matching-lists (&key (test 'eql) &allow-other-keys)
289
-  (lambda (acc next)
290
-    (matching-list-reducer test acc next)))
291
-
292
-(defun-ct compress-runs (&key (collector 'cons-new) (test 'eql) (key 'identity))
293
-  (lambda (it)
294
-    (nreverse
295
-     (reduce (funcall collector :test test :key key)
296
-             it
297
-             :initial-value ()))))
298
-
299
-(defun-ct of-length (len)
300
-  (lambda (it)
301
-    (= (length it)
302
-       len)))
303
-
304
-(defun-ct of-min-length (len)
305
-  (lambda (it)
306
-    (>= (length it)
307
-        len)))
308
-
309
-(defun-ct of-max-length (len)
310
-  (lambda (it)
311
-    (>= (length it)
312
-        len)))
313
-
314
-(defun-ct applicable-when (fun test)
315
-  (lambda (it)
316
-    (if (funcall test it)
317
-        (funcall fun it)
318
-        it)))
319
-
320
-(defun-ct sorted (comparator &rest r &key key)
321
-  (declare (ignore key))
322
-  (lambda (it)
323
-    (apply #'stable-sort (copy-seq it) comparator r)))
324
-
325
-(defun-ct element (num)
326
-  (lambda (it)
327
-    (elt it num)))
328
-
329
-(defun-ct key (key)
330
-  (lambda (map)
331
-    (declare (dynamic-extent map))
332
-    (extract-key map key)))
333
-
334
-(defun-ct regex-match (regex)
335
-  (lambda (data)
336
-    (cl-ppcre:scan-to-strings regex data)))
337
-
338
-(defun-ct include (pred)
339
-  (lambda (seq)
340
-    (remove-if-not pred seq)))
341
-
342
-(defun-ct exclude (pred)
343
-  (lambda (seq)
344
-    (remove-if pred seq)))
345
-
346
-(defun-ct pick (selector)
347
-  (lambda (seq)
348
-    (map 'list selector seq)))
349
-
350
-(defun slice (start &optional end)
351
-  (lambda (it)
352
-    (subseq it start end)))
353
-
354
-(defun-ct update (thing fun &rest args)
355
-  (apply fun thing args))
356
-
357
-(define-modify-macro updatef (fun &rest args)
358
-  update)
359
-
360
-(defun-ct transform-head (fun)
361
-  (lambda (it)
362
-    (typecase it
363
-      (list (list* (funcall fun (car it))
364
-                   (cdr it)))
365
-      (vector (let ((result (copy-seq it)))
366
-                (prog1 result
367
-                  (updatef (elt result 0) fun)))))))
368
-
369
-(defun-ct transform-tail (fun)
370
-  (lambda (it)
371
-    (typecase it
372
-      (list (list* (car it)
373
-                   (funcall fun (cdr it))))
374
-      (vector (let ((result (copy-seq it)))
375
-                (prog1 result
376
-                  (updatef (subseq result 1)
377
-                           fun)))))))
378
-
379
-(defun-ct splice-elt (elt fun)
380
-  (lambda (it)
381
-    (append (subseq it 0 elt)
382
-            (funcall fun (nth elt it))
383
-            (subseq it (1+ elt)))))
384
-
385
-(defun-ct transform-elt (elt fun)
386
-  (lambda (it)
387
-    (append (subseq it 0 elt)
388
-            (list (funcall fun (nth elt it)))
389
-            (subseq it (1+ elt)))))
390
-
391
-(defun-ct key-transform (fun key-get key-set)
392
-  (lambda (it)
393
-    (let ((key-val (funcall key-get it)))
394
-      (funcall key-set
395
-               (funcall fun key-val)))))
396
-
397
-(defun-ct juxt (fun1 &rest r)
398
-  (lambda (&rest args)
399
-    (list* (apply fun1 args)
400
-           (when r
401
-             (mapcar (lambda (f)
402
-                       (apply f args))
403
-                     r)))))
404
-
405
-(defun =>> (fun1 fun2)
406
-  (lambda (i)
407
-    (prog1 (funcall fun1 i)
408
-      (funcall fun2))))
409
-
410
-(defun-ct derive (diff-fun &key (key #'identity))
411
-  (lambda (seq)
412
-    (typecase seq
413
-      (list (cons (cons nil (car seq))
414
-                  (mapcar (lambda (next cur)
415
-                            (cons (funcall diff-fun
416
-                                           (funcall key next)
417
-                                           (funcall key  cur))
418
-                                  next))
419
-                          (cdr seq)
420
-                          seq)))
421
-      (vector (coerce (loop for cur = nil then next
422
-                            for next across seq
423
-                            if cur
424
-                              collect (cons (funcall diff-fun
425
-                                                     (funcall key next)
426
-                                                     (funcall key cur))
427
-                                            cur)
428
-                            else collect (cons nil next))
429
-                      'vector)))))
430
-
431
-(defun-ct cumsum
432
-    (&key (add-fun #'+) (key #'identity) (combine (lambda (x y) y x)) (zero 0))
433
-  (lambda (seq)
434
-    (nreverse
435
-     (reduce (lambda (accum next)
436
-               (let ((key-val (funcall key next))
437
-                     (old-val (if accum
438
-                                  (funcall key (car accum))
439
-                                  zero)))
440
-                 (cons (funcall combine
441
-                                (funcall add-fun old-val key-val)
442
-                                next)
443
-                       accum)))
444
-             seq
445
-             :initial-value ()))))
446
-
447
-(defun-ct over (fun &key (result-type 'list))
448
-  (lambda (seq)
449
-    (map result-type fun seq)))
450
-
451
-(defun-ct denest (&key (result-type 'list))
452
-  (lambda (seq)
453
-    (apply #'concatenate result-type
454
-           seq)))
455
-
456
-(defmacro applying (fun &rest args)
457
-  (alexandria:with-gensyms (seq)
458
-    `(lambda (,seq)
459
-       (apply ,fun ,@args ,seq))))
460
-
461
-(defun-ct on (fun key)
462
-  (lambda (it)
463
-    (funcall fun (funcall key it))))
464
-
465
-(defun filler (length1 length2 fill-value)
466
-  (if (< length1 length2)
467
-      (make-sequence 'vector (- length2 length1) :initial-element fill-value)
468
-      #()))
469
-
470
-(defun-ct zipping (result-type &key (fill-value nil fill-value-p))
471
-  (lambda (seq1 seq2)
472
-    (let ((length1 (when fill-value-p (length seq1)))
473
-          (length2 (when fill-value-p (length seq2))))
474
-      (let ((seq1 (if fill-value-p
475
-                      (concatenate result-type
476
-                                   seq1
477
-                                   (filler length1 length2 fill-value))
478
-                      seq1))
479
-            (seq2 (if fill-value-p
480
-                      (concatenate result-type
481
-                                   seq2
482
-                                   (filler length2 length1 fill-value))
483
-                      seq2)))
484
-        (map result-type #'list
485
-             seq1 seq2)))))
486
-
487
-(defun-ct maximizing (relation measure)
488
-  (lambda (it)
489
-    (let ((it-length (length it)))
490
-      (when (> it-length 0)
491
-        (values-list
492
-         (reduce (lambda (|arg1764| |arg1765|)
493
-                   (destructuring-bind (cur-max max-idx) |arg1764|
494
-                     (destructuring-bind (next next-idx) |arg1765|
495
-                       (if (funcall relation (funcall measure cur-max) (funcall measure next))
496
-                           (list next next-idx)
497
-                           (list cur-max max-idx)))))
498
-                 (funcall (zipping 'vector)
499
-                          it
500
-                          (alexandria:iota it-length))))))))
501
-
502
-#+nil
503
-(defmacro <> (arity &rest funs)
504
-  (let ((arg-syms (loop repeat arity collect (gensym))))
505
-    `(lambda (,@arg-syms)
506
-       (declare (dynamic-extent ,@arg-syms))
507
-       ,(fw.lu:rollup-list (mapcar (lambda (x)
508
-                                     (etypecase x
509
-                                       (list `(funcall ,x))
510
-                                       (symbol (list x))))
511
-                                   funs)
512
-                           arg-syms))))
513
-
514
-(defmacro <>1 (&rest funs)
515
-  `(alexandria:compose ,@funs))