aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/indices.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-24 11:00:52 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-24 11:00:52 -0400
commit9bccc26a0c3231d7cc9adc37c1a850ef44fd436a (patch)
treed9ee03b98126b14423af4d07ae4fd7d84589f1aa /docs/doc/indices.html
parent3863c3837ded859328243ae42f524c45741c872e (diff)
Add breadcrumbs to generated html
Diffstat (limited to 'docs/doc/indices.html')
-rw-r--r--docs/doc/indices.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/indices.html b/docs/doc/indices.html
index 2fa56e29..b50cd571 100644
--- a/docs/doc/indices.html
+++ b/docs/doc/indices.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>BQN: Indices</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">doc</a></div>
<h1 id="indices">Indices</h1>
<p>One-dimensional arrays such as K lists or Python arrays have only one kind of index, a single number that refers to an element. For multidimensional arrays using the <a href="leading.html">leading axis theory</a>, there are several types of indexing that can be useful. Historically, nested APL designs have equivocated between these, which I believe can lead to subtle errors when programming. BQN focuses on single-number (atomic) indices, which can refer to list elements or array major cells (or more generally indexing along any particular axis). When using atomic indices to select elements, the indexed array has to be a list. In contrast, elements of any array can be indicated by list indices with length equal to that array's rank. Only two BQN primitives use these list indices: Range (<code><span class='Function'>↕</span></code>), which returns an array of them if given a list argument, and Pick (<code><span class='Function'>⊑</span></code>), where the depth-1 components of an array left argument are list indices.</p>
<p>The following functions take or return indices. Except where marked, the indices are in the result; this is by far the most common type of index use. <code><span class='Function'>⊔</span></code> is given two rows as it falls into both cases. Note that in the result case, there is usually no possibility for the programmer to select the format of indices. Instead, the language should be carefully designed to make sure that the kind of index returned is as useful as possible.</p>