aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/doc/arrayrepr.html219
-rw-r--r--docs/doc/index.html1
2 files changed, 220 insertions, 0 deletions
diff --git a/docs/doc/arrayrepr.html b/docs/doc/arrayrepr.html
new file mode 100644
index 00000000..aee3ce4a
--- /dev/null
+++ b/docs/doc/arrayrepr.html
@@ -0,0 +1,219 @@
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+ <title>BQN: Array notation and display</title>
+</head>
+<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="array-notation-and-display">Array notation and display</h1>
+<p>This page documents ways arrays are represented in BQN: the notation you can use to write them and the way the REPL displays them.</p>
+<p>Array display is a feature of a BQN environment such as a REPL. You can also access it with <code><span class='Function'>•Fmt</span></code>, which takes a value and returns a string indicating how it would be formatted. Array notation is of course part of BQN source code, but you can also go from an array to one possible source code for it using the similar system function <code><span class='Function'>•Repr</span></code>.</p>
+<h2 id="array-display">Array display</h2>
+<p>Although it's really part of the language environment and not BQN itself, let's look at display first so it's clear what arrays we're talking about later on. The BQN REPL prints arrays in a way that's meant to unambiguously show the structure and data, but doesn't correspond to BQN source code. A few examples are given below; of course, displays like this appear all over the documentation.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oaVIDPigL80ICAgICAgICAgICAgICMgQXJyYXkgb2YgbGlzdHMKCjxAICAgICAgICAgICAgICAgICMgRW5jbG9zZWQgbnVsbAoK4p+o4oaVMywgInh5Iiwg4oaVMuKAvzDin6kgICMgQSBsaXN0IG9mIHRocmVlIGFycmF5cw==">↗️</a><pre> <span class='Function'>↕</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>4</span> <span class='Comment'># Array of lists
+</span>┌─
+╵ ⟨ 0 0 ⟩ ⟨ 0 1 ⟩ ⟨ 0 2 ⟩ ⟨ 0 3 ⟩
+ ⟨ 1 0 ⟩ ⟨ 1 1 ⟩ ⟨ 1 2 ⟩ ⟨ 1 3 ⟩
+ ⟨ 2 0 ⟩ ⟨ 2 1 ⟩ ⟨ 2 2 ⟩ ⟨ 2 3 ⟩
+ ┘
+
+ <span class='Function'>&lt;</span><span class='String'>@</span> <span class='Comment'># Enclosed null
+</span>┌·
+·'␀'
+ ┘
+
+ <span class='Bracket'>⟨</span><span class='Function'>↕</span><span class='Number'>3</span><span class='Separator'>,</span> <span class='String'>&quot;xy&quot;</span><span class='Separator'>,</span> <span class='Function'>↕</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Bracket'>⟩</span> <span class='Comment'># A list of three arrays
+</span>┌─
+· ⟨ 0 1 2 ⟩ "xy" ┌┐
+ ╵
+
+ ┘
+ ┘
+</pre>
+<p>There are several different ways to show arrays: as a string <code><span class='String'>&quot;&quot;</span></code>, with brackets <code><span class='Bracket'>⟨⟩</span></code>, or with corners <code><span class='Value'>┌</span></code> and <code><span class='Value'>┘</span></code>. We'll start with the most general, the corners. These show arrays of any rank while the other two ways are special cases for lists.</p>
+<p>Array displays show only the array shape and elements. The fill is an inferred property and the display never indicates or depends on it.</p>
+<h3 id="corners">Corners</h3>
+<p>Those top-left and bottom-right corners are a distinctive part of BQN's display, as other systems almost always completely enclose the contents. BQN could add the other two corners, naturally; it just doesn't. Within the corners, elements are separated by whitespace only, and generally aligned to the top left.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oMiwieHki4p+p4omN4p+oMuKAvzLipYoiYWJjZCIsNOKfqSAgIyBOZXN0ZWQgMsOXMiBhcnJheQ==">↗️</a><pre> <span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Separator'>,</span><span class='String'>&quot;xy&quot;</span><span class='Bracket'>⟩</span><span class='Function'>≍</span><span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Function'>⥊</span><span class='String'>&quot;abcd&quot;</span><span class='Separator'>,</span><span class='Number'>4</span><span class='Bracket'>⟩</span> <span class='Comment'># Nested 2×2 array
+</span>┌─
+╵ 2 "xy"
+ ┌─ 4
+ ╵"ab
+ cd"
+ ┘
+ ┘
+</pre>
+<p>The lack of extra separation is to make it clear that the corners enclose the array rather than any of its elements (elements are still distinguishable becase an individual element won't contain whitespace except maybe between quotes). Now every set of corners indicates one array. This is a good fit for the <a href="based.html">based array model</a>, where data doesn't have to be in an array.</p>
+<h4 id="rank-indicator">Rank indicator</h4>
+<p>The top left corner indicates the rank of an array. Here's a neat way using <a href="fold.html">Fold</a> (<code><span class='Modifier'>´</span></code>) and <a href="prefixes.html">Prefixes</a> (<code><span class='Function'>↑</span></code>) to nest ranks 0 through 6 together:</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MCDipYrin5w8wrQg4oaRNuKlijE=">↗️</a><pre> <span class='Number'>0</span> <span class='Function'>⥊</span><span class='Modifier2'>⟜</span><span class='Function'>&lt;</span><span class='Modifier'>´</span> <span class='Function'>↑</span><span class='Number'>6</span><span class='Function'>⥊</span><span class='Number'>1</span>
+┌·
+· ┌─
+ · ┌─
+ ╵ ┌─
+ ╎ ┌─
+ ┆ ┌─
+ ┊ ┌6
+ ┊ 0
+ ┘
+ ┘
+ ┘
+ ┘
+ ┘
+ ┘
+ ┘
+</pre>
+<p>Up to one axis can be oriented horizontally, and then all the rest are laid out vertically. So the horizontal line indicates either no axis with <code><span class='Nothing'>·</span></code> or one with <code><span class='Value'>─</span></code>, and the vertical one extends this to multiple segments. The outermost level, a plain <a href="enclose.html">enclosed</a> array, has no axes—it's a unit—so it has <code><span class='Nothing'>·</span></code> in both directions. The next is a list, with only a horizontal axis, then a table with one axis in each direction. It keeps adding line segments to show more axes up to four vertical axes, or rank 5. After this the rank is just printed as a number. Here are the same corners flattened out and labelled.</p>
+<pre> <span class='Number'>0</span> <span class='Number'>1</span> <span class='Number'>2</span> <span class='Number'>3</span> <span class='Number'>4</span> <span class='Number'>5</span>
+<span class='Value'>┌</span><span class='Nothing'>·</span> <span class='Value'>┌─</span> <span class='Value'>┌─</span> <span class='Value'>┌─</span> <span class='Value'>┌─</span> <span class='Value'>┌─</span> <span class='Value'>┌</span><span class='Number'>6</span> <span class='Value'>┌</span><span class='Number'>7</span> <span class='Value'>…</span>
+<span class='Nothing'>·</span> <span class='Nothing'>·</span> <span class='Value'>╵</span> <span class='Value'>╎</span> <span class='Value'>┆</span> <span class='Value'>┊</span> <span class='Value'>┊</span> <span class='Value'>┊</span> <span class='Value'>…</span>
+</pre>
+<h4 id="high-rank-layout">High-rank layout</h4>
+<p>We've seen already that elements of a list are placed side by side, while the rows of a table (rank-2 array) are stacked on top of each other.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=PMKoIOKGlTUgICAgICAgICMgQSBsaXN0IG9mIHVuaXRzCgoy4oC/M+KAvzTiiY0x4oC/MOKAvzUgICMgQSB0YWJsZQ==">↗️</a><pre> <span class='Function'>&lt;</span><span class='Modifier'>¨</span> <span class='Function'>↕</span><span class='Number'>5</span> <span class='Comment'># A list of units
+</span>┌─
+· ┌· ┌· ┌· ┌· ┌·
+ · 0 · 1 · 2 · 3 · 4
+ ┘ ┘ ┘ ┘ ┘
+ ┘
+
+ <span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>4</span><span class='Function'>≍</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>5</span> <span class='Comment'># A table
+</span>┌─
+╵ 2 3 4
+ 1 0 5
+ ┘
+</pre>
+<p>The 2-cells of a rank 3 array are <em>also</em> stacked on top of each other, but separated by a space. Below is a list of two examples. The second cell in the character array is marked with a <code><span class='Nothing'>·</span></code> to indicate that the gap above it really separates cells as opposed to just being a row of space characters.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MOKAvydhJyArIDwy4oC/M+KAvzQg4qWKIOKGlTI0">↗️</a><pre> <span class='Number'>0</span><span class='Ligature'>‿</span><span class='String'>'a'</span> <span class='Function'>+</span> <span class='Function'>&lt;</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>4</span> <span class='Function'>⥊</span> <span class='Function'>↕</span><span class='Number'>24</span>
+┌─
+· ┌─ ┌─
+ ╎ 0 1 2 3 ╎"abcd
+ 4 5 6 7 efgh
+ 8 9 10 11 ijkl
+
+ 12 13 14 15 ·mnop
+ 16 17 18 19 qrst
+ 20 21 22 23 uvwx"
+ ┘ ┘
+ ┘
+</pre>
+<p>The pattern continues: 3-cells are separated by 2 spaces, 4-cells by 3, and so on.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=J2EnICsgMuKAvzLigL8y4oC/MeKAvzkg4qWKIOKGlTI2ICAjIFJhbmsgNQ==">↗️</a><pre> <span class='String'>'a'</span> <span class='Function'>+</span> <span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>9</span> <span class='Function'>⥊</span> <span class='Function'>↕</span><span class='Number'>26</span> <span class='Comment'># Rank 5
+</span>┌─
+┊"abcdefghi
+
+ ·jklmnopqr
+
+
+ ·stuvwxyza
+
+ ·bcdefghij
+
+
+
+ ·klmnopqrs
+
+ ·tuvwxyzab
+
+
+ ·cdefghijk
+
+ ·lmnopqrst"
+ ┘
+</pre>
+<h4 id="empty-arrays">Empty arrays</h4>
+<p>The top-left corner can show the rank of an array but not its shape; the shape must be seen from the data. An empty array has no data, and it's hard to tell shape from a bunch of blank space. In general, an empty array is printed as <code><span class='Function'>↕</span><span class='Value'>shape</span></code>. An empty list is shown using brackets <code><span class='Bracket'>⟨⟩</span></code>, which are discussed in the next section.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oaVwqgg4p+oMOKAvzQsIDPigL8w4oC/MSwgMuKAvzDigL8wLCAw4p+p">↗️</a><pre> <span class='Function'>↕</span><span class='Modifier'>¨</span> <span class='Bracket'>⟨</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>4</span><span class='Separator'>,</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Separator'>,</span> <span class='Number'>0</span><span class='Bracket'>⟩</span>
+⟨ ↕0‿4 ↕3‿0‿1 ↕2‿0‿0 ⟨⟩ ⟩
+</pre>
+<p>A special case is an array of rank 2 where the second axis is empty. Here a row is naturally a blank line, so the shape of the array <em>can</em> be inferred from the number of lines between the corners. BQN displays such arrays with a top-right corner wrapping around to indicate the special case. Shown below are arrays with length 0 to 3.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oaR4oaVM+KAvzA=">↗️</a><pre> <span class='Function'>↑↕</span><span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>0</span>
+┌─
+· ┌┐ ┌┐ ┌┐ ┌┐
+ └┘ ╵ ╵ ╵
+ ┘
+ ┘
+ ┘
+ ┘
+</pre>
+<h3 id="simple-lists">Simple lists</h3>
+<p>In two cases BQN might use a different format to display a list on one line. The first is for a string (that is, a list of just characters), which is displayed using the exact source code that would generate it. This is different from the array display, which doesn't escape quotes, and substitutes control characters to make sure things stay horizontal.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=InRhYigJKStxdW90ZSgiIikiCgriiY0idGFiKAkpK3F1b3RlKCIiKSI=">↗️</a><pre> <span class='String'>&quot;tab( )+quote(&quot;&quot;)&quot;</span>
+"tab( )+quote("")"
+
+ <span class='Function'>≍</span><span class='String'>&quot;tab( )+quote(&quot;&quot;)&quot;</span>
+┌─
+╵"tab(␉)+quote(")"
+ ┘
+</pre>
+<p>The second is for lists with simple enough elements, which are displayed on one line with enclosing <code><span class='Bracket'>⟨⟩</span></code> instead of corners. For this case each element's display needs to fit on one line; the elements might also be bracketed lists but the display will never nest brackets three layers deep.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oIOKGlTMsICIwMTIiLCAiMDEi4oC/IjEyIiDin6kKCuKfqOKfqOKfqDDin6nin6nin6kgICMgQ2FuJ3QgZ28gdGhyZWUgbGV2ZWxzIGRlZXAKCiIi">↗️</a><pre> <span class='Bracket'>⟨</span> <span class='Function'>↕</span><span class='Number'>3</span><span class='Separator'>,</span> <span class='String'>&quot;012&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;01&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;12&quot;</span> <span class='Bracket'>⟩</span>
+⟨ ⟨ 0 1 2 ⟩ "012" ⟨ "01" "12" ⟩ ⟩
+
+ <span class='Bracket'>⟨⟨⟨</span><span class='Number'>0</span><span class='Bracket'>⟩⟩⟩</span> <span class='Comment'># Can't go three levels deep
+</span>┌─
+· ⟨ ⟨ 0 ⟩ ⟩
+ ┘
+
+ <span class='String'>&quot;&quot;</span>
+⟨⟩
+</pre>
+<p>This case also covers empty lists, which are shown as <code><span class='Bracket'>⟨⟩</span></code>. This includes an empty string, as the only difference between an empty string and any other empty list is its fill element and array displays don't depend on the fill.</p>
+<h2 id="list-literals">List literals</h2>
+<p>There are three kinds literal notation for lists: strings, list notation, and stranding. Strings indicate character lists (with space for the fill) and the other two can combine any sequence of elements.</p>
+<h3 id="strings">Strings</h3>
+<p>A <strong>string</strong> consists of a sequence of characters surrounded by double quotes <code><span class='String'>&quot;&quot;</span></code>. The only rule for the characters inside is that any double quote must be escaped by repeating it twice; otherwise the string ends at that point.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=Ii0nw5clIiIqIgoKIi0nw5clIioiICAjIEVzY2FwaW5nIGZhaWx1cmU=">↗️</a><pre> <span class='String'>&quot;-'×%&quot;&quot;*&quot;</span>
+"-'×%""*"
+
+ <span class='String'>&quot;-'×%&quot;</span><span class='Value'>*</span><span class='String'>&quot;</span> <span class='Comment'># Escaping failure
+</span>ERROR
+</pre>
+<p>Even special characters like a newline can appear in a string literal, so that string literals are automatically multi-line.</p>
+<h3 id="brackets">Brackets</h3>
+<p><strong>List notation</strong> uses angle brackets <code><span class='Bracket'>⟨⟩</span></code>. The contents are structurally identical to those of a <a href="block.html">block</a>, that is, a list of expressions <a href="syntax.html#separators">separated</a> by <code><span class='Separator'>,</span></code> or <code><span class='Separator'>⋄</span></code> or newlines. Unlike a block, a list doesn't need to have any expressions: <code><span class='Bracket'>⟨⟩</span></code> or <code><span class='Bracket'>⟨</span><span class='Separator'>⋄</span><span class='Bracket'>⟩</span></code> or <code><span class='Bracket'>⟨</span><span class='Separator'>,,⋄,</span><span class='Bracket'>⟩</span></code> will create an empty list. Other differences are that a list doesn't introduce a new <a href="lexical.html">scope</a> and all of the expressions have to result in a value, not Nothing (<code><span class='Nothing'>·</span></code>).</p>
+<p>Entries in a list are evaluated in source order, and the value will be the list of those results. The list has a subject role, even if it contains expressions with other roles. Any value can be an element.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oQCwg4o2Jy5gsIOKJjSJhYmMi4p+p">↗️</a><pre> <span class='Bracket'>⟨</span><span class='String'>@</span><span class='Separator'>,</span> <span class='Function'>⍉</span><span class='Modifier'>˘</span><span class='Separator'>,</span> <span class='Function'>≍</span><span class='String'>&quot;abc&quot;</span><span class='Bracket'>⟩</span>
+┌─
+· @ ⍉˘ ┌─
+ ╵"abc"
+ ┘
+ ┘
+</pre>
+<p>BQN's separator rules give list notation a very flexible structure. You can put all the elements on one line or spread them across lines, with the option of adding blank lines between elements. A separator at the end of a line is never needed but leading and trailing separators are allowed.</p>
+<pre><span class='Bracket'>⟨</span>
+ <span class='String'>&quot;e0&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;e1&quot;</span>
+ <span class='Bracket'>⟨</span>
+ <span class='String'>'e'</span>
+ <span class='String'>'2'</span>
+ <span class='Bracket'>⟩</span>
+ <span class='String'>&quot;e3&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;e4&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;e5&quot;</span>
+
+ <span class='String'>&quot;e6&quot;</span>
+<span class='Bracket'>⟩</span>
+</pre>
+<h3 id="strands">Strands</h3>
+<p><strong>Strand notation</strong> is another way to write lists of length two or more. The elements are connected with the ligature character <code><span class='Ligature'>‿</span></code>. It has a precedence lower than the <a href="namespace.html">namespace</a> dot but higher than anything else other than paired brackets <code><span class='Paren'>()</span></code>, <code><span class='Brace'>{}</span></code>, and <code><span class='Bracket'>⟨⟩</span></code>, so compound elements generally need to be placed in parentheses. Expressions joined by ligatures behave exactly the same as those in list notation: they are evaluated in order and placed in a list.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=K+KAv8K04oC/4oiY4oC/w5cKCivigL/CtOKAv+KImOKAv8OXICDiiaEgIOKfqCsswrQs4oiYLMOX4p+p">↗️</a><pre> <span class='Function'>+</span><span class='Ligature'>‿</span><span class='Modifier'>´</span><span class='Ligature'>‿</span><span class='Modifier2'>∘</span><span class='Ligature'>‿</span><span class='Function'>×</span>
+⟨ + ´ ∘ × ⟩
+
+ <span class='Function'>+</span><span class='Ligature'>‿</span><span class='Modifier'>´</span><span class='Ligature'>‿</span><span class='Modifier2'>∘</span><span class='Ligature'>‿</span><span class='Function'>×</span> <span class='Function'>≡</span> <span class='Bracket'>⟨</span><span class='Function'>+</span><span class='Separator'>,</span><span class='Modifier'>´</span><span class='Separator'>,</span><span class='Modifier2'>∘</span><span class='Separator'>,</span><span class='Function'>×</span><span class='Bracket'>⟩</span>
+1
+</pre>
+<p>Strand notation is mainly useful for simple elements that don't require parentheses. A strand with one set of parentheses is no shorter than using list notation (but could look nicer), and one with more parentheses will be longer.</p>
+<h3 id="array-notation">Array notation?</h3>
+<p>BQN has literal notation for lists only right now. To get an array with rank other than 1, either <a href="reshape.html">reshape</a> a list, or <a href="couple.html#merge-and-array-theory">merge</a> a list of arrays:</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oiY4oC/MiDipYog4p+oMiwzLCA0LDEsIDAsNeKfqQoKPiDin6gy4oC/MywgNOKAvzEsIDDigL814p+p">↗️</a><pre> <span class='Modifier2'>∘</span><span class='Ligature'>‿</span><span class='Number'>2</span> <span class='Function'>⥊</span> <span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Separator'>,</span><span class='Number'>3</span><span class='Separator'>,</span> <span class='Number'>4</span><span class='Separator'>,</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>0</span><span class='Separator'>,</span><span class='Number'>5</span><span class='Bracket'>⟩</span>
+┌─
+╵ 2 3
+ 4 1
+ 0 5
+ ┘
+
+ <span class='Function'>&gt;</span> <span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span><span class='Separator'>,</span> <span class='Number'>4</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>5</span><span class='Bracket'>⟩</span>
+┌─
+╵ 2 3
+ 4 1
+ 0 5
+ ┘
+</pre>
+<p>The characters <code><span class='Value'>[]</span></code> are reserved to potentially combine list notation with merging, allowing the above to be written <code><span class='Value'>[</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span><span class='Separator'>,</span> <span class='Number'>4</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>5</span><span class='Value'>]</span></code>. This would allow non-empty arrays with rank one or more to be written without a primitive, but not rank 0 or empty arrays. Since creating arrays in general would still require primitives like <code><span class='Function'>&lt;</span></code> or <code><span class='Function'>⥊</span></code>, it's not clear whether this notation is worth it. General array notation is a surprisingly complicated topic; see the article about it <a href="https://aplwiki.com/wiki/Array_notation">on the APL Wiki</a>.</p>
diff --git a/docs/doc/index.html b/docs/doc/index.html
index 195a2dd7..ff2c4ade 100644
--- a/docs/doc/index.html
+++ b/docs/doc/index.html
@@ -23,6 +23,7 @@
<ul>
<li><a href="context.html">Context-free grammar</a></li>
<li><a href="based.html">Based array theory</a></li>
+<li><a href="arrayrepr.html">Array notation and display</a></li>
<li><a href="indices.html">Array indices</a></li>
<li><a href="leading.html">The leading axis model</a></li>
<li><a href="train.html">Function trains</a></li>