diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/doc/arrayrepr.html | 31 | ||||
| -rw-r--r-- | docs/doc/expression.html | 14 | ||||
| -rw-r--r-- | docs/doc/syntax.html | 17 | ||||
| -rw-r--r-- | docs/help/beginlist.html | 2 | ||||
| -rw-r--r-- | docs/help/endlist.html | 2 | ||||
| -rw-r--r-- | docs/help/strand.html | 2 | ||||
| -rw-r--r-- | docs/index.html | 2 |
7 files changed, 39 insertions, 31 deletions
diff --git a/docs/doc/arrayrepr.html b/docs/doc/arrayrepr.html index 6009a771..06a55f82 100644 --- a/docs/doc/arrayrepr.html +++ b/docs/doc/arrayrepr.html @@ -158,9 +158,9 @@ ⟨⟩ </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"><a class="header" href="#list-literals">List literals</a></h2> +<h2 id="array-literals"><a class="header" href="#array-literals">Array literals</a></h2> <p><em>The tutorial section <a href="../tutorial/list.html#list-notation">here</a> also covers this topic.</em></p> -<p>There are three kinds literal notation for lists: strings, list notation, and stranding. Strings indicate character lists (with space for the <a href="fill.html">fill</a>) and the other two can combine any sequence of elements.</p> +<p>There are three kinds literal notation for lists: strings, list notation, and stranding. Strings indicate character lists (with space for the <a href="fill.html">fill</a>) and the other two can combine any sequence of elements. Additionally, there's a square bracket notation that can form higher-rank arrays.</p> <h3 id="strings"><a class="header" href="#strings">Strings</a></h3> <p>A <strong>string</strong> consists of a sequence of characters surrounded by double quotes <code><span class='String'>""</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'>"-'×%""*"</span> @@ -192,6 +192,16 @@ <span class='String'>"e6"</span> <span class='Bracket'>⟩</span> </pre> +<h4 id="high-rank-arrays"><a class="header" href="#high-rank-arrays">High-rank arrays</a></h4> +<p>Higher-rank arrays can be written with <code><span class='Bracket'>[]</span></code>, an <strong>array notation</strong> that indicates each element is to be used as a <a href="array.html#cells">cell</a> of its result. It's identical to forming a list and applying <a href="couple.html#merge-and-array-theory">Merge</a> (<code><span class='Bracket'>[</span><span class='Value'>…</span><span class='Bracket'>]</span></code> is the same as <code><span class='Function'>></span><span class='Bracket'>⟨</span><span class='Value'>…</span><span class='Bracket'>⟩</span></code>).</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=WzLigL8zLCA04oC/MSwgMOKAvzVd">↗️</a><pre> <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>This syntax doesn't work for creating rank 0 arrays—use <a href="enclose.html">Enclose</a> <code><span class='Function'><</span></code> for these—or empty arrays. The notation <code><span class='Bracket'>[]</span></code> would be ambiguous, so it's not allowed (although it can be used for destructuring, which works with an existing array). To create a specific empty array, <a href="reshape.html">Reshape</a> (<code><span class='Function'>⥊</span></code>) is probably the best approach.</p> <h3 id="strands"><a class="header" href="#strands">Strands</a></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> @@ -213,20 +223,3 @@ <p>Explicit stranding is also more general, because it applies equally to elements of any role. <code><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Function'>+</span><span class='Ligature'>‿</span><span class='Number'>3</span></code> is a perfectly fine list in BQN—maybe it's part of an AST—while <code><span class='Number'>2</span> <span class='Function'>+</span> <span class='Number'>3</span></code> is clearly not a list. Meanwhile J and K restrict their stranding even further, to numbers only. It does mean that issues with stranding show up in fewer cases, but it also means that changing one element of a list from a constant to a variable requires rewriting the whole list.</p> <p>Why couldn't the more explicit list notation <code><span class='Bracket'>⟨</span><span class='Value'>a</span><span class='Separator'>,</span><span class='Value'>b</span><span class='Separator'>,</span><span class='Value'>c</span><span class='Bracket'>⟩</span></code> drop the separators? This is also largely for reasons of generality—even more important here since <code><span class='Bracket'>⟨⟩</span></code> is the more general-purpose list notation. Writing <code><span class='Bracket'>⟨</span><span class='Function'>÷</span><span class='Separator'>,</span><span class='Function'>-</span><span class='Separator'>,</span><span class='Number'>4</span><span class='Bracket'>⟩</span></code> without the <code><span class='Separator'>,</span></code> won't go well. For something like <code><span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Function'>×</span><span class='Value'>c</span><span class='Separator'>,</span><span class='Value'>b</span><span class='Function'>-</span><span class='Number'>1</span><span class='Bracket'>⟩</span></code>, maybe the interpreter could sort it out but it would be pretty confusing. Pretty soon you're going through the list character by character trying to figure out which space is actually a separator. And cursing, probably.</p> <p>Fortunately, I find that after a reasonable period of adjustment typing ligatures instead of spaces doesn't feel strange, and reading code is improved overall by the more explicit notation. A minor note is that lists of literal numbers, where APL-style stranding is best, tend to show up more in the snippets that beginners write to test out the language than in programs even in the tens of lines. So this issue sticks out in first experiences with BQN, but will come up less later on.</p> -<h3 id="array-notation"><a class="header" href="#array-notation">Array notation?</a></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+oMiwzLCA0LDEsIDAsNeKfqQoKWzLigL8zLCA04oC/MSwgMOKAvzVd">↗️</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='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='Bracket'>[]</span></code> are reserved to potentially combine list notation with merging, allowing the above to be written <code><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></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'><</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/expression.html b/docs/doc/expression.html index b2f40951..067eed73 100644 --- a/docs/doc/expression.html +++ b/docs/doc/expression.html @@ -5,7 +5,7 @@ </head> <div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">doc</a></div> <h1 id="expression-syntax"><a class="header" href="#expression-syntax">Expression syntax</a></h1> -<p>BQN expressions are the part of <a href="syntax.html">syntax</a> that describes computations to perform. Programs are mainly made up of expressions with a little organizing material like <a href="block.html">blocks</a> and <a href="namespace.html">namespaces</a> around them. This page explains how functions, modifiers, and assignment combine with their inputs. It doesn't describe <a href="syntax.html#constants">constant</a> and <a href="arrayrepr.html#list-literals">array</a> literals, which each form a single subject for grammatical purposes.</p> +<p>BQN expressions are the part of <a href="syntax.html">syntax</a> that describes computations to perform. Programs are mainly made up of expressions with a little organizing material like <a href="block.html">blocks</a> and <a href="namespace.html">namespaces</a> around them. This page explains how functions, modifiers, and assignment combine with their inputs. It doesn't describe <a href="syntax.html#constants">constant</a> and <a href="arrayrepr.html#array-literals">array</a> literals, which each form a single subject for grammatical purposes.</p> <p>The <a href="../tutorial/expression.html">first tutorial</a> also covers how to build and read BQN expressions.</p> <h2 id="overview"><a class="header" href="#overview">Overview</a></h2> <p>BQN expressions consist of subjects, functions, and modifiers arranged in sequence, with parentheses to group parts into subexpressions. Assignment arrows <code><span class='Gets'>←</span></code> and <code><span class='Gets'>↩</span></code> can also be present and mostly behave similar to functions. Functions can be applied to subjects or grouped into trains, while modifiers can be applied to subjects or functions. The most important kinds of application are:</p> @@ -106,7 +106,7 @@ </table> <p>Primitive tokens, since they have a fixed value, always have a role that matches their type. They are functions, unless they fall into one of the two modifier patterns. 1-modifiers have superscript glyphs, and 2-modifiers have glyphs with an unbroken circle—that is, one without a line through it, excluding functions <code><span class='Function'>⌽</span></code> and <code><span class='Function'>⍉</span></code>.</p> <p>Variable names can be written in any case and with underscores added, and these changes don't affect what <a href="lexical.html">identifier</a> the name refers to. <code><span class='Value'>ab</span></code>, <code><span class='Value'>aB</span></code>, <code><span class='Function'>AB</span></code>, and <code><span class='Modifier2'>_a_B_</span></code> are all the same variable. However, the spelling—specifically the first and last characters—determine the variable's role. A lowercase first letter indicates a subject, and an uppercase first letter makes it a function. A leading underscore (regardless of the following character) indicates a 1-modifier, and both leading and trailing underscores makes a 2-modifier.</p> -<p>Besides these, character, string, and <a href="arrayrepr.html#list-literals">list literals</a> always have a subject role, and the role of a <a href="block.html">block</a> is determined by its type, which depends either on the header it has or which special variables it uses.</p> +<p>Besides these, character, string, and <a href="arrayrepr.html#array-literals">array literals</a> always have a subject role, and the role of a <a href="block.html">block</a> is determined by its type, which depends either on the header it has or which special variables it uses.</p> <p>The role of a compound expression, formed by applying an operation to some inputs, depends on the operation applied. This system is discussed in the remaining sections below.</p> <h2 id="nothing"><a class="header" href="#nothing">Nothing</a></h2> <p>The character <code><span class='Nothing'>·</span></code> is called Nothing. While it can be easier to think of it as a value, it can't be passed around in variables, and so can also be interpreted as an element of syntax. The special name <code><span class='Value'>𝕨</span></code> also functions as Nothing if the block that contains it is called with one argument (the uppercase spelling <code><span class='Function'>𝕎</span></code> doesn't, but instead immediately causes an error). Both <code><span class='Nothing'>·</span></code> and <code><span class='Value'>𝕨</span></code> have a subject role.</p> @@ -218,6 +218,16 @@ <span class='Value'>s</span> ⟨ 0 1 2 3 ⟩ </pre> +<p>Array destructuring using <code><span class='Bracket'>[]</span></code> is also possible: it's equivalent to splitting the right-hand side with <code><span class='Function'><</span><span class='Modifier'>˘</span></code> and then applying list destructuring.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=W3QsdV0g4oaQIOKGlTLigL8zCgp1">↗️</a><pre> <span class='Bracket'>[</span><span class='Value'>t</span><span class='Separator'>,</span><span class='Value'>u</span><span class='Bracket'>]</span> <span class='Gets'>←</span> <span class='Function'>↕</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span> +┌─ +╵ ⟨ 0 0 ⟩ ⟨ 0 1 ⟩ ⟨ 0 2 ⟩ + ⟨ 1 0 ⟩ ⟨ 1 1 ⟩ ⟨ 1 2 ⟩ + ┘ + + <span class='Value'>u</span> +⟨ ⟨ 1 0 ⟩ ⟨ 1 1 ⟩ ⟨ 1 2 ⟩ ⟩ +</pre> <p>Namespace destructuring uses an overlapping syntax, fully described in <a href="namespace.html#imports">its own section</a>. The left hand side is a list of names or aliases <code><span class='Value'>to</span><span class='Gets'>⇐</span><span class='Value'>from</span></code>.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ceKAv3Ig4oapIHtx4oeQMity4oeQMC41fSDii4QgcQ==">↗️</a><pre> <span class='Value'>q</span><span class='Ligature'>‿</span><span class='Value'>r</span> <span class='Gets'>↩</span> <span class='Brace'>{</span><span class='Value'>q</span><span class='Gets'>⇐</span><span class='Number'>2</span><span class='Function'>+</span><span class='Value'>r</span><span class='Gets'>⇐</span><span class='Number'>0.5</span><span class='Brace'>}</span> <span class='Separator'>⋄</span> <span class='Value'>q</span> 2.5 diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html index 6312fbbd..a5c75b6e 100644 --- a/docs/doc/syntax.html +++ b/docs/doc/syntax.html @@ -58,11 +58,15 @@ </tr> <tr> <td><code><span class='Bracket'>⟨⟩</span></code></td> -<td><a href="#list-notation">List</a> (rank-1 array)</td> +<td><a href="#list-and-array-notation">List</a></td> +</tr> +<tr> +<td><code><span class='Bracket'>[]</span></code></td> +<td><a href="#list-and-array-notation">Array</a></td> </tr> <tr> <td><code><span class='Ligature'>‿</span></code></td> -<td><a href="#list-notation">Strand</a> (lightweight list syntax)</td> +<td><a href="#list-and-array-notation">Strand</a> (lightweight list syntax)</td> </tr> <tr> <td><code><span class='Brace'>{}</span></code></td> @@ -182,13 +186,14 @@ <p>The four <a href="expression.html#syntactic-role">roles</a> (subject, function, two kinds of modifier) describe expressions, not values. When an expression is evaluated, the value's <a href="types.html">type</a> doesn't have to correspond to its role, and can even change from one evaluation to another. An expression's role is determined entirely by its source code, so it's fixed.</p> <p><a href="expression.html#assignment">Assignment</a> arrows <code><span class='Gets'>←</span></code>, <code><span class='Gets'>↩</span></code>, and <code><span class='Gets'>⇐</span></code> store expression results in variables: <code><span class='Gets'>←</span></code> and <code><span class='Gets'>⇐</span></code> create new variables while <code><span class='Gets'>↩</span></code> modifies existing ones. The general format is <code><span class='Function'>Name</span> <span class='Gets'>←</span> <span class='Function'>Value</span></code>, where the two sides have the same role. Additionally, <code><span class='Value'>lhs</span> <span class='Function'>F</span><span class='Gets'>↩</span> <span class='Value'>rhs</span></code> is a shortened form of <code><span class='Value'>lhs</span> <span class='Gets'>↩</span> <span class='Value'>lhs</span> <span class='Function'>F</span> <span class='Value'>rhs</span></code> and <code><span class='Value'>lhs</span> <span class='Function'>F</span><span class='Gets'>↩</span></code> expands to <code><span class='Value'>lhs</span> <span class='Gets'>↩</span> <span class='Function'>F</span> <span class='Value'>lhs</span></code>.</p> <p>The double arrow <code><span class='Gets'>⇐</span></code> is used for functionality relating to <a href="namespace.html">namespaces</a>. It has a few purposes: exporting assignment <code><span class='Value'>name</span><span class='Gets'>⇐</span><span class='Value'>value</span></code>, plain export <code><span class='Value'>name</span><span class='Gets'>⇐</span></code>, and aliasing <code><span class='Bracket'>⟨</span><span class='Value'>alias</span><span class='Gets'>⇐</span><span class='Value'>field</span><span class='Bracket'>⟩</span><span class='Gets'>←</span><span class='Value'>namespace</span></code>. A block that uses it for export returns a namespace rather than the result of its last statement. The other namespace-related bit of syntax is field access <code><span class='Value'>ns.field</span></code>.</p> -<h2 id="lists-and-blocks"><a class="header" href="#lists-and-blocks">Lists and blocks</a></h2> -<p>Lists and code blocks can both be represented as sequences of expressions in source code. They both have paired bracket representations, using <code><span class='Bracket'>⟨⟩</span></code> for lists and <code><span class='Brace'>{}</span></code> for blocks, as well as a shortcut "stranding" notation using <code><span class='Ligature'>‿</span></code> for lists.</p> +<h2 id="arrays-and-blocks"><a class="header" href="#arrays-and-blocks">Arrays and blocks</a></h2> +<p>Arrays and code blocks can both be represented as sequences of expressions in source code. There are paired bracket representations, using <code><span class='Bracket'>⟨⟩</span></code> for lists, <code><span class='Bracket'>[]</span></code> for arrays, and <code><span class='Brace'>{}</span></code> for blocks, as well as a shortcut "stranding" notation using <code><span class='Ligature'>‿</span></code> for lists.</p> <h3 id="separators"><a class="header" href="#separators">Separators</a></h3> <p>The characters <code><span class='Separator'>⋄</span></code> and <code><span class='Separator'>,</span></code> and newline are completely interchangeable and are used to separate expressions. An expression might be an element in a list or a line in a block. Empty sections—those that consist only of whitespace—are ignored. This means that any number of separators can be used between expressions, and that leading and trailing separators are also allowed. The expressions are evaluated in text order: left to right and top to bottom.</p> -<h3 id="list-notation"><a class="header" href="#list-notation">List notation</a></h3> -<p><em><a href="arrayrepr.html#list-literals">Full documentation</a></em></p> +<h3 id="list-and-array-notation"><a class="header" href="#list-and-array-notation">List and array notation</a></h3> +<p><em><a href="arrayrepr.html#array-literals">Full documentation</a></em></p> <p>Lists (1-dimensional arrays) are enclosed in angle brackets <code><span class='Bracket'>⟨⟩</span></code>, with the results of the expressions in between being the list's elements. Lists of two elements or more can also be written with the ligature character <code><span class='Ligature'>‿</span></code>. This character has higher binding strength than any part of an expression except <code><span class='Value'>.</span></code> for namespace field access. If one of the elements is a compound expression, then it will need to be enclosed in parentheses.</p> +<p>Arrays, or at least non-empty ones with rank 1 or more, can be written with square brackets <code><span class='Bracket'>[]</span></code>. These work just like angle brackets but <a href="couple.html#merge-and-array-theory">merge</a> the elements so that they form cells of the result.</p> <h3 id="blocks"><a class="header" href="#blocks">Blocks</a></h3> <p><em><a href="block.html">Full documentation</a></em></p> <p>Blocks are written with curly braces <code><span class='Brace'>{}</span></code> and can have a subject, function, or modifier role. The contents are any number of bodies separated by <code><span class='Head'>;</span></code>. Each body is a sequence of expressions to be evaluated in order, possibly with a header, followed by <code><span class='Head'>:</span></code>, that sets the type and describes expected inputs. A body runs in its own environment according to the rules of <a href="lexical.html">lexical scoping</a>. The result is either a <a href="namespace.html">namespace</a>, if the body used <code><span class='Gets'>⇐</span></code>, or the result of the last expression.</p> diff --git a/docs/help/beginlist.html b/docs/help/beginlist.html index 478c61d8..0f1493be 100644 --- a/docs/help/beginlist.html +++ b/docs/help/beginlist.html @@ -6,7 +6,7 @@ <div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">help</a></div> <h1 id="mathematical-left-angle-bracket-"><a class="header" href="#mathematical-left-angle-bracket-">Mathematical Left Angle Bracket (<code><span class='Bracket'>⟨</span></code>)</a></h1> <h2 id="--begin-list"><a class="header" href="#--begin-list"><code><span class='Bracket'>⟨</span> <span class='Value'>...</span></code>: Begin list</a></h2> -<p><a class="fulldoc" href="../doc/syntax.html#list-notation">→full documentation</a></p> +<p><a class="fulldoc" href="../doc/syntax.html#list-and-array-notation">→full documentation</a></p> <p>Starts a list. Inner elements must be separated by <code><span class='Separator'>,</span></code> or <code><span class='Separator'>⋄</span></code>. Lists can be nested in other lists.</p> <p>Must end with a corresponding <code><span class='Bracket'>⟩</span></code>.</p> diff --git a/docs/help/endlist.html b/docs/help/endlist.html index 5355f722..ddc54ed5 100644 --- a/docs/help/endlist.html +++ b/docs/help/endlist.html @@ -6,7 +6,7 @@ <div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">help</a></div> <h1 id="mathematical-right-angle-bracket-"><a class="header" href="#mathematical-right-angle-bracket-">Mathematical Right Angle Bracket (<code><span class='Bracket'>⟩</span></code>)</a></h1> <h2 id="--end-list"><a class="header" href="#--end-list"><code><span class='Value'>...</span> <span class='Bracket'>⟩</span></code>: End list</a></h2> -<p><a class="fulldoc" href="../doc/syntax.html#list-notation">→full documentation</a></p> +<p><a class="fulldoc" href="../doc/syntax.html#list-and-array-notation">→full documentation</a></p> <p>Ends a list started by a <code><span class='Bracket'>⟨</span></code>. See <a href="beginlist.html">Begin List</a> for more details.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oMSwgMiwgM+KfqQoK4p+oKyDii4QgLSDii4QgNTbin6k=">↗️</a><pre> <span class='Bracket'>⟨</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>2</span><span class='Separator'>,</span> <span class='Number'>3</span><span class='Bracket'>⟩</span> ⟨ 1 2 3 ⟩ diff --git a/docs/help/strand.html b/docs/help/strand.html index 60d577aa..d464f95c 100644 --- a/docs/help/strand.html +++ b/docs/help/strand.html @@ -6,7 +6,7 @@ <div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">help</a></div> <h1 id="undertie-"><a class="header" href="#undertie-">Undertie (<code><span class='Ligature'>‿</span></code>)</a></h1> <h2 id="-strand"><a class="header" href="#-strand"><code><span class='Ligature'>‿</span></code>: Strand</a></h2> -<p><a class="fulldoc" href="../doc/syntax.html#list-notation">→full documentation</a></p> +<p><a class="fulldoc" href="../doc/syntax.html#list-and-array-notation">→full documentation</a></p> <p>Create a list via <a href="../doc/arrayrepr.html#strands">strand notation</a>.</p> <p>Placing <code><span class='Ligature'>‿</span></code> between valid BQN expressions will create a list out of the end results of those expressions.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MeKAvzLigL8zCgor4oC/LeKAvzU2">↗️</a><pre> <span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span> diff --git a/docs/index.html b/docs/index.html index 1b13d42c..962ea837 100644 --- a/docs/index.html +++ b/docs/index.html @@ -53,7 +53,7 @@ </ul> <p>But it's redesigned from the ground up, with many features new to the array paradigm:</p> <ul> -<li>The <a href="doc/based.html"><strong>based array model</strong></a> eliminates the surprise of floating arrays and the hassle of explicit boxes, while dedicated <a href="doc/arrayrepr.html#list-literals"><strong>list notation</strong></a> does away with the <a href="doc/arrayrepr.html#why-not-whitespace">gotchas</a> of <a href="https://aplwiki.com/wiki/Strand_notation">stranding</a>.</li> +<li>The <a href="doc/based.html"><strong>based array model</strong></a> eliminates the surprise of floating arrays and the hassle of explicit boxes, while dedicated <a href="doc/arrayrepr.html#array-literals"><strong>array notation</strong></a> does away with the <a href="doc/arrayrepr.html#why-not-whitespace">gotchas</a> of <a href="https://aplwiki.com/wiki/Strand_notation">stranding</a>.</li> <li><a href="doc/context.html"><strong>Context-free grammar</strong></a> makes it easier for machines and humans to understand code, and naturally leads to <a href="doc/functional.html"><strong>first-class functions</strong></a>, which can even be used to <a href="doc/control.html">reinvent control structures</a>.</li> <li><a href="keymap.html"><strong>New symbols</strong></a> for built-in functionality make the syntactic role of every primitive instantly visible, and aim to be more consistent and intuitive.</li> <li>No-nonsense <a href="doc/namespace.html"><strong>namespace syntax</strong></a> encapsulates data and even allows for a little <a href="doc/oop.html">object-oriented programming</a>.</li> |
