summaryrefslogtreecommitdiff
path: root/devdocs/elisp/sequences-arrays-vectors.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/sequences-arrays-vectors.html
new repository
Diffstat (limited to 'devdocs/elisp/sequences-arrays-vectors.html')
-rw-r--r--devdocs/elisp/sequences-arrays-vectors.html63
1 files changed, 63 insertions, 0 deletions
diff --git a/devdocs/elisp/sequences-arrays-vectors.html b/devdocs/elisp/sequences-arrays-vectors.html
new file mode 100644
index 00000000..f4fdbba6
--- /dev/null
+++ b/devdocs/elisp/sequences-arrays-vectors.html
@@ -0,0 +1,63 @@
+ <h2 class="chapter">Sequences, Arrays, and Vectors</h2> <p>The <em>sequence</em> type is the union of two other Lisp types: lists and arrays. In other words, any list is a sequence, and any array is a sequence. The common property that all sequences have is that each is an ordered collection of elements. </p> <p>An <em>array</em> is a fixed-length object with a slot for each of its elements. All the elements are accessible in constant time. The four types of arrays are strings, vectors, char-tables and bool-vectors. </p> <p>A list is a sequence of elements, but it is not a single primitive object; it is made of cons cells, one cell per element. Finding the <var>n</var>th element requires looking through <var>n</var> cons cells, so elements farther from the beginning of the list take longer to access. But it is possible to add elements to the list, or remove elements. </p> <p>The following diagram shows the relationship between these types: </p> <div class="example"> <pre class="example"> _____________________________________________
+ | |
+ | Sequence |
+ | ______ ________________________________ |
+ | | | | | |
+ | | List | | Array | |
+ | | | | ________ ________ | |
+ | |______| | | | | | | |
+ | | | Vector | | String | | |
+ | | |________| |________| | |
+ | | ____________ _____________ | |
+ | | | | | | | |
+ | | | Char-table | | Bool-vector | | |
+ | | |____________| |_____________| | |
+ | |________________________________| |
+ |_____________________________________________|
+</pre>
+</div> <table class="menu" border="0" cellspacing="0"> <tr>
+<td align="left" valign="top">• <a href="sequence-functions" accesskey="1">Sequence Functions</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Functions that accept any kind of sequence. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="arrays" accesskey="2">Arrays</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Characteristics of arrays in Emacs Lisp. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="array-functions" accesskey="3">Array Functions</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Functions specifically for arrays. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="vectors" accesskey="4">Vectors</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Special characteristics of Emacs Lisp vectors. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="vector-functions" accesskey="5">Vector Functions</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Functions specifically for vectors. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="char_002dtables" accesskey="6">Char-Tables</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to work with char-tables. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="bool_002dvectors" accesskey="7">Bool-Vectors</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to work with bool-vectors. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="rings" accesskey="8">Rings</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Managing a fixed-size ring of objects. </td>
+</tr> </table><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/Sequences-Arrays-Vectors.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Sequences-Arrays-Vectors.html</a>
+ </p>
+</div>