-
Notifications
You must be signed in to change notification settings - Fork 3
/
documentation.html
359 lines (274 loc) · 17.6 KB
/
documentation.html
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<html lang="en">
<head>
<title>Dlist</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Dlist">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<h1 class="settitle">Dlist</h1>
<div class="node">
<a name="Top"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#Dictionary">Dictionary</a>,
Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
</div>
<h2 class="unnumbered">Introduction</h2>
<p>This is an <span class="sc">sb-texinfo</span> autogenerated manual for Dlist.
<!-- DO NOT EDIT BY HAND -->
<!-- ...unless you're just using this as a template for a manually maintained -->
<!-- versiom, which is obviously OK. -->
<p>An implementation of the doubly-linked list in Common Lisp.
<div class="contents">
<h2>Table of Contents</h2>
<ul>
<li><a name="toc_Top" href="#Top">Introduction</a>
<li><a name="toc_Dictionary" href="#Dictionary">1 Dictionary</a>
<li><a name="toc_Function-Index" href="#Function-Index">Appendix A Function Index</a>
<li><a name="toc_Type-Index" href="#Type-Index">Appendix B Type Index</a>
</li></ul>
</div>
<!-- MACHINE GENERATED FILE! Do not edit by hand! -->
<!-- See SB-TEXINFO for details. -->
<ul class="menu">
<li><a accesskey="1" href="#Dictionary">Dictionary</a>
<li><a accesskey="2" href="#Function-Index">Function Index</a>
<li><a accesskey="3" href="#Type-Index">Type Index</a>
</ul>
<div class="node">
<a name="Dictionary"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#Function-Index">Function Index</a>,
Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<!-- node-name, next, previous, up -->
<h2 class="chapter">1 Dictionary</h2>
<p><a name="index-dcons-1"></a><a name="Structure-dcons"></a>
<div class="defun">
— Structure: <b>dcons</b><var><a name="index-dcons-2"></a></var><br>
<blockquote><p>Class precedence list: <code>dcons, structure-object, t</code>
<p>A three-member cons cell for doubly-linked lists, which has `prev', `data' and `next' slots
</p></blockquote></div>
<p><a name="index-dlist-3"></a><a name="Class-dlist"></a>
<div class="defun">
— Class: <b>dlist</b><var><a name="index-dlist-4"></a></var><br>
<blockquote><p>Class precedence list: <code>dlist, sequence, standard-object, t</code>
<p>A class that represents a doubly-linked list
</p></blockquote></div>
<p><a name="index-dlist_002dpop-5"></a><a name="Macro-dlist_002dpop"></a>
<div class="defun">
— Macro: <b>dlist-pop</b><var> dlist &key from-end<a name="index-dlist_002dpop-6"></a></var><br>
<blockquote><p>Pops an element from dlist and returns it. If `from-end' is non-`nil', the element will be popped from the end of the dlist. Otherwise, it will be popped from the begining.
</p></blockquote></div>
<p><a name="index-dlist_002dpush-7"></a><a name="Macro-dlist_002dpush"></a>
<div class="defun">
— Macro: <b>dlist-push</b><var> obj dlist &key at-end<a name="index-dlist_002dpush-8"></a></var><br>
<blockquote><p>Pushes `obj' onto `dlist'. If `at-end' is not-nil, the element is added to the end of dlist, otherwise it is added to the begining.
</p></blockquote></div>
<p><a name="index-dodcons-9"></a><a name="Macro-dodcons"></a>
<div class="defun">
— Macro: <b>dodcons</b> (<var>var dlist &optional result-form from-end</var>)<var> &body body<a name="index-dodcons-10"></a></var><br>
<blockquote><p>Loops over the dconses in `dlist', binding `var' to each in turn. If `from-end' is non-nil, the loop proceeds from the last element of ther list to the first. This is basically `dolist' for dlists.
</p></blockquote></div>
<p><a name="index-dodlist-11"></a><a name="Macro-dodlist"></a>
<div class="defun">
— Macro: <b>dodlist</b> (<var>var dlist &optional result-form from-end</var>)<var> &body body<a name="index-dodlist-12"></a></var><br>
<blockquote><p>Loops over the elements in `dlist', binding each to `var' in turn, then executing `body'. If `from-end' is non-nil, the loop proceeds from the end of the list to the begining.
</p></blockquote></div>
<p><a name="index-copy_002ddlist-13"></a><a name="Function-copy_002ddlist"></a>
<div class="defun">
— Function: <b>copy-dlist</b><var> dlist &key deep-copy<a name="index-copy_002ddlist-14"></a></var><br>
<blockquote><p>Copies `dlist', returning a new dlist with the same elements as `dlist'. If `deep-copy' is true, `copy-dlist' deep-copies dlists and sequences.
</p></blockquote></div>
<p><a name="index-data-15"></a><a name="Function-data"></a>
<div class="defun">
— Function: <b>data</b><var> dcons<a name="index-data-16"></a></var><br>
<blockquote><p>Accesses the `data' slot of a dcons. The `data' of nil is nil.
</p></blockquote></div>
<p><a name="index-g_t_0040setf_007bdata_007d-17"></a><a name="Function-_0028setf-data_0029"></a>
<div class="defun">
— Function: <b>(setf data)</b><var> val place<a name="index-g_t_0040setf_007bdata_007d-18"></a></var><br>
<blockquote><p>Sets the `data' slot of `place' (which must be a `dcons') to `val'
</p></blockquote></div>
<p><a name="index-dcons-19"></a><a name="Function-dcons"></a>
<div class="defun">
— Function: <b>dcons</b><var> prev data next<a name="index-dcons-20"></a></var><br>
<blockquote><p>Constructs a `dcons' with the given `prev', `data', and `next'
</p></blockquote></div>
<p><a name="index-dconsp-21"></a><a name="Function-dconsp"></a>
<div class="defun">
— Function: <b>dconsp</b><var> object<a name="index-dconsp-22"></a></var><br>
<blockquote><p>Returns <code>t</code> if `object' is a dcons
</p></blockquote></div>
<p><a name="index-dlist-23"></a><a name="Function-dlist"></a>
<div class="defun">
— Function: <b>dlist</b><var> &rest elements<a name="index-dlist-24"></a></var><br>
<blockquote><p>Returns a doubly-linked list (dlist) with the elements in `elements'
</p></blockquote></div>
<p><a name="index-dlist_002d_003elist-25"></a><a name="Function-dlist_002d_003elist"></a>
<div class="defun">
— Function: <b>dlist->list</b><var> dlist<a name="index-dlist_002d_003elist-26"></a></var><br>
<blockquote><p>Converts a dlist to a list
</p></blockquote></div>
<p><a name="index-dlist_002dappend-27"></a><a name="Function-dlist_002dappend"></a>
<div class="defun">
— Function: <b>dlist-append</b><var> &rest dlists<a name="index-dlist_002dappend-28"></a></var><br>
<blockquote><p>Appends `dlists' non-derstructively by calling `dlist-nconc' with shallow copies of each dlist.
</p></blockquote></div>
<p><a name="index-dlist_002dfirst-29"></a><a name="Function-dlist_002dfirst"></a>
<div class="defun">
— Function: <b>dlist-first</b><var> dlist<a name="index-dlist_002dfirst-30"></a></var><br>
<blockquote><p>Gets the first `dcons' in a `dlist'
</p></blockquote></div>
<p><a name="index-dlist_002dlast-31"></a><a name="Function-dlist_002dlast"></a>
<div class="defun">
— Function: <b>dlist-last</b><var> dlist<a name="index-dlist_002dlast-32"></a></var><br>
<blockquote><p>Gets the last `dcons' in a `dlist'
</p></blockquote></div>
<p><a name="index-dlist_002dlength-33"></a><a name="Function-dlist_002dlength"></a>
<div class="defun">
— Function: <b>dlist-length</b><var> dlist<a name="index-dlist_002dlength-34"></a></var><br>
<blockquote><p>Returns the length of `dlist'
</p></blockquote></div>
<p><a name="index-dlist_002dnconc-35"></a><a name="Function-dlist_002dnconc"></a>
<div class="defun">
— Function: <b>dlist-nconc</b><var> &rest dlists<a name="index-dlist_002dnconc-36"></a></var><br>
<blockquote><p>Appends `dlists'. This works like `nconc' for singly-linked lists, except it is destructive and the resuld will share structure with the input dlists. This function should have running time proportional to the number of lists being appended.
</p></blockquote></div>
<p><a name="index-dlist_002dnth-37"></a><a name="Function-dlist_002dnth"></a>
<div class="defun">
— Function: <b>dlist-nth</b><var> n dlist &key from-end<a name="index-dlist_002dnth-38"></a></var><br>
<blockquote><p>Returns the nth element of `dlist', as the primary value. If n is <code>>=</code> the length of the list, <code>nil</code> will be returned. The secondary value will be <code>t</code> if the value was actually found in the list, and <code>nil</code> otherwise. If `from-end' is true, `dlist-nth' returns the @code{n}th element from the end, subject to the rules above.
</p></blockquote></div>
<p><a name="index-g_t_0040setf_007bdlist_002dnth_007d-39"></a><a name="Function-_0028setf-dlist_002dnth_0029"></a>
<div class="defun">
— Function: <b>(setf dlist-nth)</b><var> val n dlist &key from-end<a name="index-g_t_0040setf_007bdlist_002dnth_007d-40"></a></var><br>
<blockquote><p>Sets the data of the nth dcons in `dlist' to `val'. If `from-end' is true, sets the @code{n}th element from the end.
</p></blockquote></div>
<p><a name="index-dlist_002dreverse-41"></a><a name="Function-dlist_002dreverse"></a>
<div class="defun">
— Function: <b>dlist-reverse</b><var> dlist<a name="index-dlist_002dreverse-42"></a></var><br>
<blockquote><p>Reverses dlist non-destructively.
</p></blockquote></div>
<p><a name="index-dlist_003d-43"></a><a name="Function-dlist_003d"></a>
<div class="defun">
— Function: <b>dlist=</b><var> dlist &rest more-dlists<a name="index-dlist_003d-44"></a></var><br>
<blockquote><p>Tests dlists for equality by element, recursively descending into sub-dlists.
</p></blockquote></div>
<p><a name="index-dlistp-45"></a><a name="Function-dlistp"></a>
<div class="defun">
— Function: <b>dlistp</b><var> object<a name="index-dlistp-46"></a></var><br>
<blockquote><p>Tests if `object' is a dlist.
</p></blockquote></div>
<p><a name="index-make_002ddlist-47"></a><a name="Function-make_002ddlist"></a>
<div class="defun">
— Function: <b>make-dlist</b><var> size &key initial-element<a name="index-make_002ddlist-48"></a></var><br>
<blockquote><p>Creates a dlist that contains `initial-element' `size' times.
</p></blockquote></div>
<p><a name="index-mapdcon-49"></a><a name="Function-mapdcon"></a>
<div class="defun">
— Function: <b>mapdcon</b><var> function dlist &rest more-dlists-and-from-end<a name="index-mapdcon-50"></a></var><br>
<blockquote><p>Maps `function' over `dlist' the dconses in `dlist', then returns `dlist'
</p></blockquote></div>
<p><a name="index-mapdcons-51"></a><a name="Function-mapdcons"></a>
<div class="defun">
— Function: <b>mapdcons</b><var> function dlist &rest more-dlists-and-from-end<a name="index-mapdcons-52"></a></var><br>
<blockquote><p>Maps over the dconses in `dlist' and `more-dlists'. If `more-dlists' contains the keyword :from-end, the value after it in the argumnt list will be taken as the value of :from-end, and both will be removed from `more-dlists'. The order of elements in the result is the same as the oder in which the elements are returned from the function.
</p></blockquote></div>
<p><a name="index-mapdlist-53"></a><a name="Function-mapdlist"></a>
<div class="defun">
— Function: <b>mapdlist</b><var> function dlist &rest more-dlists-and-from-end<a name="index-mapdlist-54"></a></var><br>
<blockquote><p>Behaves like `mapdcons', except the function will be passed the `data' of each dcons.
</p></blockquote></div>
<p><a name="index-next-55"></a><a name="Function-next"></a>
<div class="defun">
— Function: <b>next</b><var> dcons<a name="index-next-56"></a></var><br>
<blockquote><p>Accesses the `next' slot of a dcons. The `next' of nil is nil.
</p></blockquote></div>
<p><a name="index-g_t_0040setf_007bnext_007d-57"></a><a name="Function-_0028setf-next_0029"></a>
<div class="defun">
— Function: <b>(setf next)</b><var> val place<a name="index-g_t_0040setf_007bnext_007d-58"></a></var><br>
<blockquote><p>Sets the `next' slot of `place' (which must be a `dcons') to `val'
</p></blockquote></div>
<p><a name="index-nthdcons-59"></a><a name="Function-nthdcons"></a>
<div class="defun">
— Function: <b>nthdcons</b><var> n dlist &key from-end<a name="index-nthdcons-60"></a></var><br>
<blockquote><p>Returns the @code{n}th dcons in `dlist' (zero-based). If n is <code>>=</code> the length of the list, returns <code>nil</code>. If `from-end' is true, returns the @code{n}th dcons from the end.
</p></blockquote></div>
<p><a name="index-prev-61"></a><a name="Function-prev"></a>
<div class="defun">
— Function: <b>prev</b><var> dcons<a name="index-prev-62"></a></var><br>
<blockquote><p>Accesses the `prev' slot of a dcons. The `prev' of nil is nil.
</p></blockquote></div>
<p><a name="index-g_t_0040setf_007bprev_007d-63"></a><a name="Function-_0028setf-prev_0029"></a>
<div class="defun">
— Function: <b>(setf prev)</b><var> val place<a name="index-g_t_0040setf_007bprev_007d-64"></a></var><br>
<blockquote><p>Sets the `prev' slot of `place' (which must be a `dcons') to `val'
</p></blockquote></div>
<div class="node">
<a name="Function-Index"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#Type-Index">Type Index</a>,
Previous: <a rel="previous" accesskey="p" href="#Dictionary">Dictionary</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<!-- node-name, next, previous, up -->
<h2 class="appendix">Appendix A Function Index</h2>
<ul class="index-fn" compact>
<li><a href="#index-g_t_0040setf_007bdata_007d-17"><code>(setf data)</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-g_t_0040setf_007bdlist_002dnth_007d-39"><code>(setf dlist-nth)</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-g_t_0040setf_007bnext_007d-57"><code>(setf next)</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-g_t_0040setf_007bprev_007d-63"><code>(setf prev)</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-copy_002ddlist-13"><code>copy-dlist</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-data-15"><code>data</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dcons-19"><code>dcons</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dconsp-21"><code>dconsp</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist-23"><code>dlist</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002d_003elist-25"><code>dlist->list</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dappend-27"><code>dlist-append</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dfirst-29"><code>dlist-first</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dlast-31"><code>dlist-last</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dlength-33"><code>dlist-length</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dnconc-35"><code>dlist-nconc</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dnth-37"><code>dlist-nth</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dpop-5"><code>dlist-pop</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dpush-7"><code>dlist-push</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_002dreverse-41"><code>dlist-reverse</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist_003d-43"><code>dlist=</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlistp-45"><code>dlistp</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dodcons-9"><code>dodcons</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dodlist-11"><code>dodlist</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-make_002ddlist-47"><code>make-dlist</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-mapdcon-49"><code>mapdcon</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-mapdcons-51"><code>mapdcons</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-mapdlist-53"><code>mapdlist</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-next-55"><code>next</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-nthdcons-59"><code>nthdcons</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-prev-61"><code>prev</code></a>: <a href="#Dictionary">Dictionary</a></li>
</ul><div class="node">
<a name="Type-Index"></a>
<p><hr>
Previous: <a rel="previous" accesskey="p" href="#Function-Index">Function Index</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<!-- node-name, next, previous, up -->
<h2 class="appendix">Appendix B Type Index</h2>
<ul class="index-tp" compact>
<li><a href="#index-dcons-1"><code>dcons</code></a>: <a href="#Dictionary">Dictionary</a></li>
<li><a href="#index-dlist-3"><code>dlist</code></a>: <a href="#Dictionary">Dictionary</a></li>
</ul></body></html>