summaryrefslogtreecommitdiff
path: root/devdocs/elisp/box-diagrams.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/elisp/box-diagrams.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/elisp/box-diagrams.html')
-rw-r--r--devdocs/elisp/box-diagrams.html54
1 files changed, 0 insertions, 54 deletions
diff --git a/devdocs/elisp/box-diagrams.html b/devdocs/elisp/box-diagrams.html
deleted file mode 100644
index f30af8eb..00000000
--- a/devdocs/elisp/box-diagrams.html
+++ /dev/null
@@ -1,54 +0,0 @@
- <h4 class="subsubsection">Drawing Lists as Box Diagrams</h4> <p>A list can be illustrated by a diagram in which the cons cells are shown as pairs of boxes, like dominoes. (The Lisp reader cannot read such an illustration; unlike the textual notation, which can be understood by both humans and computers, the box illustrations can be understood only by humans.) This picture represents the three-element list <code>(rose violet buttercup)</code>: </p> <div class="example"> <pre class="example"> --- --- --- --- --- ---
- | | |--&gt; | | |--&gt; | | |--&gt; nil
- --- --- --- --- --- ---
- | | |
- | | |
- --&gt; rose --&gt; violet --&gt; buttercup
-</pre>
-</div> <p>In this diagram, each box represents a slot that can hold or refer to any Lisp object. Each pair of boxes represents a cons cell. Each arrow represents a reference to a Lisp object, either an atom or another cons cell. </p> <p>In this example, the first box, which holds the <small>CAR</small> of the first cons cell, refers to or holds <code>rose</code> (a symbol). The second box, holding the <small>CDR</small> of the first cons cell, refers to the next pair of boxes, the second cons cell. The <small>CAR</small> of the second cons cell is <code>violet</code>, and its <small>CDR</small> is the third cons cell. The <small>CDR</small> of the third (and last) cons cell is <code>nil</code>. </p> <p>Here is another diagram of the same list, <code>(rose violet
-buttercup)</code>, sketched in a different manner: </p> <div class="example"> <pre class="example"> --------------- ---------------- -------------------
-| car | cdr | | car | cdr | | car | cdr |
-| rose | o--------&gt;| violet | o--------&gt;| buttercup | nil |
-| | | | | | | | |
- --------------- ---------------- -------------------
-</pre>
-</div> <p>A list with no elements in it is the <em>empty list</em>; it is identical to the symbol <code>nil</code>. In other words, <code>nil</code> is both a symbol and a list. </p> <p>Here is the list <code>(A ())</code>, or equivalently <code>(A nil)</code>, depicted with boxes and arrows: </p> <div class="example"> <pre class="example"> --- --- --- ---
- | | |--&gt; | | |--&gt; nil
- --- --- --- ---
- | |
- | |
- --&gt; A --&gt; nil
-</pre>
-</div> <p>Here is a more complex illustration, showing the three-element list, <code>((pine needles) oak maple)</code>, the first element of which is a two-element list: </p> <div class="example"> <pre class="example"> --- --- --- --- --- ---
- | | |--&gt; | | |--&gt; | | |--&gt; nil
- --- --- --- --- --- ---
- | | |
- | | |
- | --&gt; oak --&gt; maple
- |
- | --- --- --- ---
- --&gt; | | |--&gt; | | |--&gt; nil
- --- --- --- ---
- | |
- | |
- --&gt; pine --&gt; needles
-</pre>
-</div> <p>The same list represented in the second box notation looks like this: </p> <div class="example"> <pre class="example"> -------------- -------------- --------------
-| car | cdr | | car | cdr | | car | cdr |
-| o | o-------&gt;| oak | o-------&gt;| maple | nil |
-| | | | | | | | | |
- -- | --------- -------------- --------------
- |
- |
- | -------------- ----------------
- | | car | cdr | | car | cdr |
- ------&gt;| pine | o-------&gt;| needles | nil |
- | | | | | |
- -------------- ----------------
-</pre>
-</div><div class="_attribution">
- <p class="_attribution-p">
- Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
- <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Box-Diagrams.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Box-Diagrams.html</a>
- </p>
-</div>