aboutsummaryrefslogtreecommitdiff
path: root/doc
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 /doc
parent4cc1cb8d7b34eb99d77fd35a53797e6929b348f7 (diff)
Update list notation links
Diffstat (limited to 'doc')
-rw-r--r--doc/arrayrepr.md2
-rw-r--r--doc/context.md2
-rw-r--r--doc/control.md2
-rw-r--r--doc/fromDyalog.md2
-rw-r--r--doc/fromJ.md2
-rw-r--r--doc/glossary.md2
-rw-r--r--doc/syntax.md4
7 files changed, 10 insertions, 6 deletions
diff --git a/doc/arrayrepr.md b/doc/arrayrepr.md
index b8264704..74e8426e 100644
--- a/doc/arrayrepr.md
+++ b/doc/arrayrepr.md
@@ -86,6 +86,8 @@ This case also covers empty lists, which are shown as `⟨⟩`. This includes an
## List literals
+*The tutorial section [here](../tutorial/list.md#list-notation) also covers this topic.*
+
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.
### Strings
diff --git a/doc/context.md b/doc/context.md
index 516a5f18..15a32b2b 100644
--- a/doc/context.md
+++ b/doc/context.md
@@ -48,7 +48,7 @@ One rule for typing is also best considered to be a pre-parsing rule like the sp
## BQN's grammar
-A formal treatment is included in [the spec](../spec/grammar.md). 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.
+A formal treatment is included in [the spec](../spec/grammar.md). BQN's grammar—the ways syntactic roles interact—follows the original APL model (plus trains) closely, with allowances for new features like [list notation](arrayrepr.md#list-literals). In order to keep BQN's syntax context-free, the syntactic role of any expression must be known from its contents, just like tokens.
Here is a table of the APL-derived modifier and function application rules:
diff --git a/doc/control.md b/doc/control.md
index d3b47d29..80e3159b 100644
--- a/doc/control.md
+++ b/doc/control.md
@@ -228,7 +228,7 @@ Very well… a for loop is just a while loop with some extra pre- and post-actio
The initialization can be a simple expression as shown; in fact it's a little silly to make initialization one of the arguments to `For` at all.Unlike in C, it's impossible to declare a variable that's local to the whole `For` 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 `For` loop, just surround it in an extra set of curly braces.
-The `While` loop alone allows syntax similar to the `For` loop. Perform any initialization outside of the loop, and compose the post-action with the main body using the reverse composition `{𝔾∘𝔽}`. Because the composition binds less tightly than stranding, the bracketed list notation has to be used here.
+The `While` loop alone allows syntax similar to the `For` loop. Perform any initialization outside of the loop, and compose the post-action with the main body using the reverse composition `{𝔾∘𝔽}`. Because the composition binds less tightly than stranding, the bracketed [list notation](arrayrepr.md#brackets) has to be used here.
c←27 ⋄ n←0
While ⟨{𝕤⋄1<c}, {𝕤⋄n+↩1}{𝔾∘𝔽}{𝕤
diff --git a/doc/fromDyalog.md b/doc/fromDyalog.md
index 71a61b48..edc6a3d7 100644
--- a/doc/fromDyalog.md
+++ b/doc/fromDyalog.md
@@ -51,7 +51,7 @@ BQN doesn't have guards: it uses modifiers or [control structures](control.md) i
The assignment arrow `←` defines a new variable in a block, while `↩` modifies an existing one.
-BQN uses the ligature character `‿` for stranding, instead of plain juxtaposition. It also has a [list notation](syntax.md#list-notation) using `⟨⟩`.
+BQN uses the ligature character `‿` for stranding, instead of plain juxtaposition. It also has a [list notation](arrayrepr.md#brackets) using `⟨⟩`.
## For reading
diff --git a/doc/fromJ.md b/doc/fromJ.md
index 3e1abbce..6363420b 100644
--- a/doc/fromJ.md
+++ b/doc/fromJ.md
@@ -45,7 +45,7 @@ In J, the part of speech is an inherent property of a value, while in BQN it is
| `[:` | `·` | Cap
| `assert.` | `!` |
-BQN's explicit functions and modifiers are called "blocks", and have a more sophisticated syntax than J; see [the documentation](block.md). BQN uses [lexical scope](lexical.md), and has no global variables. BQN also has a [list notation](syntax.md#list-notation) using `⟨⟩`.
+BQN's explicit functions and modifiers are called "blocks", and have a more sophisticated syntax than J; see [the documentation](block.md). BQN uses [lexical scope](lexical.md), and has no global variables. BQN also has a [list notation](arrayrepr.md#brackets) using `⟨⟩`.
## For reading
diff --git a/doc/glossary.md b/doc/glossary.md
index 9fd9a568..a3389e3f 100644
--- a/doc/glossary.md
+++ b/doc/glossary.md
@@ -108,7 +108,7 @@ The possible roles are:
* **Nothing**: A special value-like entity that comes from `·`, `𝕨` in a function with no left argument, or a function called on nothing.
* **Statement**: An expression, or nothing (`·`).
* **Ligature**: The character `‿`.
-* [**List notation**](syntax.md#list-notation): The angle brackets `⟨⟩` or ligatures used to indicate a list.
+* [**List notation**](arrayrepr.md#brackets): The angle brackets `⟨⟩` or ligatures used to indicate a list.
## Assignment and scoping
diff --git a/doc/syntax.md b/doc/syntax.md
index 61ea0114..76489695 100644
--- a/doc/syntax.md
+++ b/doc/syntax.md
@@ -72,7 +72,7 @@ BQN's built-in operations also have patterns to indicate the syntactic role: 1-m
### Assignment
-Another element that can be included in expressions is assignment, which is written with `←` to *define* (also called "declare" in many other languages) a variable and `↩` to *change* 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.
+Another element that can be included in expressions is assignment, which is written with `←` to *define* (also called "declare" in many other languages) a variable and `↩` to *change* its definition. A variable can only be defined once within a [scope](lexical.md), 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.
x←1 ⋄ {x←2 ⋄ x↩3 ⋄ x}
x
@@ -103,6 +103,8 @@ The characters `⋄` and `,` and newline are completely interchangeable and are
### List notation
+*[Full documentation](arrayrepr.md#list-literals)*
+
Lists (1-dimensional arrays) are enclosed in angle brackets `⟨⟩`, 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 `‿`. 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.
### Blocks