aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-23 22:49:20 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-23 22:49:20 -0400
commita717221a7dd2fb88ff9d5d07e221a83dc558b47d (patch)
tree0b3ceb6ca130ea5f9dccd706ddb72368a71bd924 /docs
parent4cc1cb8d7b34eb99d77fd35a53797e6929b348f7 (diff)
Update list notation links
Diffstat (limited to 'docs')
-rw-r--r--docs/doc/arrayrepr.html1
-rw-r--r--docs/doc/context.html2
-rw-r--r--docs/doc/control.html2
-rw-r--r--docs/doc/fromDyalog.html2
-rw-r--r--docs/doc/fromJ.html2
-rw-r--r--docs/doc/syntax.html3
-rw-r--r--docs/index.html2
7 files changed, 8 insertions, 6 deletions
diff --git a/docs/doc/arrayrepr.html b/docs/doc/arrayrepr.html
index aee3ce4a..fa2332c6 100644
--- a/docs/doc/arrayrepr.html
+++ b/docs/doc/arrayrepr.html
@@ -159,6 +159,7 @@
</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><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 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>
diff --git a/docs/doc/context.html b/docs/doc/context.html
index 8c0ea92e..b08f70a0 100644
--- a/docs/doc/context.html
+++ b/docs/doc/context.html
@@ -59,7 +59,7 @@
<p>The associations between spelling and syntactic role are considered part of BQN's <a href="../spec/token.html">token formation rules</a>.</p>
<p>One rule for typing is also best considered to be a pre-parsing rule like the spelling system: the role of a brace construct <code><span class='Brace'>{}</span></code> with no header is determined by which special arguments it uses: it's a subject if there are none, but a <code><span class='Value'>𝕨</span></code> or <code><span class='Value'>𝕩</span></code> makes it at least a function, an <code><span class='Function'>𝔽</span></code> makes it a 1- or 2-modifier, and a <code><span class='Function'>𝔾</span></code> always makes it a 2-modifier.</p>
<h2 id="bqns-grammar">BQN's grammar</h2>
-<p>A formal treatment is included in <a href="../spec/grammar.html">the spec</a>. BQN's grammar—the ways syntactic roles interact—follows the original APL model (plus trains) closely, with allowances for new features like list notation. In order to keep BQN's syntax context-free, the syntactic role of any expression must be known from its contents, just like tokens.</p>
+<p>A formal treatment is included in <a href="../spec/grammar.html">the spec</a>. BQN's grammar—the ways syntactic roles interact—follows the original APL model (plus trains) closely, with allowances for new features like <a href="arrayrepr.html#list-literals">list notation</a>. In order to keep BQN's syntax context-free, the syntactic role of any expression must be known from its contents, just like tokens.</p>
<p>Here is a table of the APL-derived modifier and function application rules:</p>
<table>
<thead>
diff --git a/docs/doc/control.html b/docs/doc/control.html
index ad6c65f8..9dc6e2a8 100644
--- a/docs/doc/control.html
+++ b/docs/doc/control.html
@@ -185,7 +185,7 @@
<span class='Brace'>}</span>
</pre>
<p>The initialization can be a simple expression as shown; in fact it's a little silly to make initialization one of the arguments to <code><span class='Function'>For</span></code> at all.Unlike in C, it's impossible to declare a variable that's local to the whole <code><span class='Function'>For</span></code> loop but not its surroundings. Hopefully this is obvious from the structure of the code! Only curly braces can create a new scope, so to localize some variables in the <code><span class='Function'>For</span></code> loop, just surround it in an extra set of curly braces.</p>
-<p>The <code><span class='Function'>While</span></code> loop alone allows syntax similar to the <code><span class='Function'>For</span></code> loop. Perform any initialization outside of the loop, and compose the post-action with the main body using the reverse composition <code><span class='Brace'>{</span><span class='Function'>𝔾</span><span class='Modifier2'>∘</span><span class='Function'>𝔽</span><span class='Brace'>}</span></code>. Because the composition binds less tightly than stranding, the bracketed list notation has to be used here.</p>
+<p>The <code><span class='Function'>While</span></code> loop alone allows syntax similar to the <code><span class='Function'>For</span></code> loop. Perform any initialization outside of the loop, and compose the post-action with the main body using the reverse composition <code><span class='Brace'>{</span><span class='Function'>𝔾</span><span class='Modifier2'>∘</span><span class='Function'>𝔽</span><span class='Brace'>}</span></code>. Because the composition binds less tightly than stranding, the bracketed <a href="arrayrepr.html#brackets">list notation</a> has to be used here.</p>
<pre><span class='Value'>c</span><span class='Gets'>←</span><span class='Number'>27</span> <span class='Separator'>⋄</span> <span class='Value'>n</span><span class='Gets'>←</span><span class='Number'>0</span>
<span class='Function'>While</span> <span class='Bracket'>⟨</span><span class='Brace'>{</span><span class='Value'>𝕤</span><span class='Separator'>⋄</span><span class='Number'>1</span><span class='Function'>&lt;</span><span class='Value'>c</span><span class='Brace'>}</span><span class='Separator'>,</span> <span class='Brace'>{</span><span class='Value'>𝕤</span><span class='Separator'>⋄</span><span class='Value'>n</span><span class='Function'>+</span><span class='Gets'>↩</span><span class='Number'>1</span><span class='Brace'>}{</span><span class='Function'>𝔾</span><span class='Modifier2'>∘</span><span class='Function'>𝔽</span><span class='Brace'>}{</span><span class='Value'>𝕤</span>
<span class='Function'>Match</span> <span class='Paren'>(</span><span class='Number'>2</span><span class='Function'>|</span><span class='Value'>c</span><span class='Paren'>)</span><span class='Ligature'>‿</span><span class='Brace'>{</span>
diff --git a/docs/doc/fromDyalog.html b/docs/doc/fromDyalog.html
index d213dbb5..4568fd31 100644
--- a/docs/doc/fromDyalog.html
+++ b/docs/doc/fromDyalog.html
@@ -108,7 +108,7 @@
</table>
<p>BQN doesn't have guards: it uses modifiers or <a href="control.html">control structures</a> instead. However, BQN function and modifier blocks have headers that allow pattern matching. See the <a href="block.html">block</a> documentation.</p>
<p>The assignment arrow <code><span class='Gets'>←</span></code> defines a new variable in a block, while <code><span class='Gets'>↩</span></code> modifies an existing one.</p>
-<p>BQN uses the ligature character <code><span class='Ligature'>‿</span></code> for stranding, instead of plain juxtaposition. It also has a <a href="syntax.html#list-notation">list notation</a> using <code><span class='Bracket'>⟨⟩</span></code>.</p>
+<p>BQN uses the ligature character <code><span class='Ligature'>‿</span></code> for stranding, instead of plain juxtaposition. It also has a <a href="arrayrepr.html#brackets">list notation</a> using <code><span class='Bracket'>⟨⟩</span></code>.</p>
<h2 id="for-reading">For reading</h2>
<p>Here are some closest equivalents in Dyalog APL for the BQN functions that don't use the same glyphs as APL. Correspondence can be approximate, and <code><span class='Function'>⌽</span></code> is just used as a decorator to mean &quot;reverse some things&quot;.</p>
<table>
diff --git a/docs/doc/fromJ.html b/docs/doc/fromJ.html
index e5407e07..3dcb7473 100644
--- a/docs/doc/fromJ.html
+++ b/docs/doc/fromJ.html
@@ -107,7 +107,7 @@
</tr>
</tbody>
</table>
-<p>BQN's explicit functions and modifiers are called &quot;blocks&quot;, and have a more sophisticated syntax than J; see <a href="block.html">the documentation</a>. BQN uses <a href="lexical.html">lexical scope</a>, and has no global variables. BQN also has a <a href="syntax.html#list-notation">list notation</a> using <code><span class='Bracket'>⟨⟩</span></code>.</p>
+<p>BQN's explicit functions and modifiers are called &quot;blocks&quot;, and have a more sophisticated syntax than J; see <a href="block.html">the documentation</a>. BQN uses <a href="lexical.html">lexical scope</a>, and has no global variables. BQN also has a <a href="arrayrepr.html#brackets">list notation</a> using <code><span class='Bracket'>⟨⟩</span></code>.</p>
<h2 id="for-reading">For reading</h2>
<p>J analogues of BQN primitive functions are given below. They are not always the same; usually this is because BQN has extra functionality relative to J, although in some cases it has less or different functionality.</p>
<p>Functions <code><span class='Function'>+</span></code> <code><span class='Function'>-</span></code> <code><span class='Function'>|</span></code> <code><span class='Function'>&lt;</span></code> <code><span class='Function'>&gt;</span></code> are the same in both languages.</p>
diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html
index c22de4f6..1eab4d0c 100644
--- a/docs/doc/syntax.html
+++ b/docs/doc/syntax.html
@@ -137,7 +137,7 @@
</pre>
<p>BQN's built-in operations also have patterns to indicate the syntactic role: 1-modifiers (<code><span class='Modifier'>˜¨˘⁼⌜´`</span></code>) are all superscript characters, and 2-modifiers (<code><span class='Modifier2'>∘○⊸⟜⌾⊘◶⚇⎉⍟</span></code>) all have an unbroken circle (two functions <code><span class='Function'>⌽⍉</span></code> have broken circles with lines through them). Every other built-in constant is a function, although the special symbols <code><span class='Number'>¯</span></code>, <code><span class='Number'>∞</span></code>, and <code><span class='Number'>π</span></code> are used as part of numeric literal notation.</p>
<h3 id="assignment">Assignment</h3>
-<p>Another element that can be included in expressions is assignment, which is written with <code><span class='Gets'>←</span></code> to <em>define</em> (also called &quot;declare&quot; in many other languages) a variable and <code><span class='Gets'>↩</span></code> to <em>change</em> its definition. A variable can only be defined once within a scope, and can only be changed if it has already been defined. However, it can be shadowed, meaning that it is defined again in an inner scope even though it has a definition in an outer scope already.</p>
+<p>Another element that can be included in expressions is assignment, which is written with <code><span class='Gets'>←</span></code> to <em>define</em> (also called &quot;declare&quot; in many other languages) a variable and <code><span class='Gets'>↩</span></code> to <em>change</em> its definition. A variable can only be defined once within a <a href="lexical.html">scope</a>, and can only be changed if it has already been defined. However, it can be shadowed, meaning that it is defined again in an inner scope even though it has a definition in an outer scope already.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=eOKGkDEg4ouEIHt44oaQMiDii4QgeOKGqTMg4ouEIHh9Cng=">↗️</a><pre> <span class='Value'>x</span><span class='Gets'>←</span><span class='Number'>1</span> <span class='Separator'>⋄</span> <span class='Brace'>{</span><span class='Value'>x</span><span class='Gets'>←</span><span class='Number'>2</span> <span class='Separator'>⋄</span> <span class='Value'>x</span><span class='Gets'>↩</span><span class='Number'>3</span> <span class='Separator'>⋄</span> <span class='Value'>x</span><span class='Brace'>}</span>
3
<span class='Value'>x</span>
@@ -163,6 +163,7 @@
<h3 id="separators">Separators</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 function. 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">List notation</h3>
+<p><em><a href="arrayrepr.html#list-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. If one of the elements is a compound expression, then it will need to be enclosed in parentheses.</p>
<h3 id="blocks">Blocks</h3>
<p><em><a href="block.html">Full documentation</a></em></p>
diff --git a/docs/index.html b/docs/index.html
index b22d6707..7a23a015 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -36,7 +36,7 @@
</ul>
<p>But BQN is redesigned from the ground up, with brand new ideas to make these paradigms easier to use and less likely to fail.</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="tutorial/list.html#list-notation"><strong>list notation</strong></a> does away with <a href="https://aplwiki.com/wiki/Strand_notation">stranding</a> gotchas.</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#list-literals"><strong>list notation</strong></a> does away with <a href="https://aplwiki.com/wiki/Strand_notation">stranding</a> gotchas.</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>