aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/tutorial/combinator.html6
-rw-r--r--docs/tutorial/expression.html2
-rw-r--r--docs/tutorial/index.html2
-rw-r--r--docs/tutorial/list.html36
-rw-r--r--docs/tutorial/variable.html6
-rw-r--r--tutorial/README.md2
-rw-r--r--tutorial/combinator.md6
-rw-r--r--tutorial/expression.md2
-rw-r--r--tutorial/list.md22
-rw-r--r--tutorial/variable.md4
10 files changed, 46 insertions, 42 deletions
diff --git a/docs/tutorial/combinator.html b/docs/tutorial/combinator.html
index abfcfbe0..65b223ab 100644
--- a/docs/tutorial/combinator.html
+++ b/docs/tutorial/combinator.html
@@ -304,10 +304,10 @@
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=InN0cmluZyIgPeKXi+KJoCAic3Rpbmci">↗️</a><pre> <span class='String'>&quot;string&quot;</span> <span class='Function'>=</span><span class='Modifier2'>○</span><span class='Function'>≠</span> <span class='String'>&quot;sting&quot;</span>
0
</pre>
-<p>Let's use the list formation function Solo/Couple (<code><span class='Function'>≍</span></code>) to see what happens more clearly:</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=InN0cmluZyIg4omN4peL4omgICJzdGluZyIK4omN4peL4omgICJzdGluZyI=">↗️</a><pre> <span class='String'>&quot;string&quot;</span> <span class='Function'>≍</span><span class='Modifier2'>○</span><span class='Function'>≠</span> <span class='String'>&quot;sting&quot;</span>
+<p>Let's use the list formation function Enlist/Pair (<code><span class='Function'>⋈</span></code>) to see what happens more clearly:</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=InN0cmluZyIg4ouI4peL4omgICJzdGluZyIK4ouI4peL4omgICJzdGluZyI=">↗️</a><pre> <span class='String'>&quot;string&quot;</span> <span class='Function'>⋈</span><span class='Modifier2'>○</span><span class='Function'>≠</span> <span class='String'>&quot;sting&quot;</span>
⟨ 6 5 ⟩
- <span class='Function'>≍</span><span class='Modifier2'>○</span><span class='Function'>≠</span> <span class='String'>&quot;sting&quot;</span>
+ <span class='Function'>⋈</span><span class='Modifier2'>○</span><span class='Function'>≠</span> <span class='String'>&quot;sting&quot;</span>
⟨ 5 ⟩
</pre>
<p>Atop always applies its right operand once, passing every argument (that is, one or two of them) in that call. Over calls its right operand on each argument individually. The results are then all used as arguments to the left operand. If there's only one argument, Atop and Over turn out to be the same: both of them call the right operand, then the left, like ordinary mathematical composition. Here are the two together for comparison.</p>
diff --git a/docs/tutorial/expression.html b/docs/tutorial/expression.html
index 98b4530d..ed446ae2 100644
--- a/docs/tutorial/expression.html
+++ b/docs/tutorial/expression.html
@@ -331,7 +331,7 @@
3
</pre>
<p>Well, I guess it's not pedagogically useless, as it does demonstrate that a modifier can be applied to subjects as well as functions. Even though <code><span class='Number'>3</span></code> is a subject, <code><span class='Number'>3</span><span class='Modifier'>˙</span></code> is a function, and can be applied to and ignore the two arguments <code><span class='Number'>2</span></code> and <code><span class='Number'>4</span></code>.</p>
-<p>With three examples you may have noticed that 1-modifiers tend to cluster at the top of the screen. In fact, every primitive 1-modifer is a superscript character: we've covered <code><span class='Modifier'>˜⁼˙</span></code>, and the remaining array-based modifiers <code><span class='Modifier'>˘¨⌜´˝`</span></code> will show up later.</p>
+<p>With three examples you may have noticed that 1-modifiers tend to cluster at the top of the line. In fact, every primitive 1-modifer is a superscript character: we've covered <code><span class='Modifier'>˜⁼˙</span></code>, and the remaining array-based modifiers <code><span class='Modifier'>˘¨⌜´˝`</span></code> will show up later.</p>
<h2 id="2-modifiers"><a class="header" href="#2-modifiers">2-modifiers</a></h2>
<p>Made it to the last role, the 2-modifier (if you think something's been skipped, you're free to call subjects 0-modifiers. They don't modify anything. Just not when other people can hear you). To introduce them we'll use Atop <code><span class='Modifier2'>∘</span></code>, which composes two functions as in mathematics. The resulting function allows one or two arguments like any BQN function: these are all passed to the function on the right, and the result of that application is passed to the function on the left. So the function on the left is only ever called with one argument.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MyDDl8uc4oiYKyA0ICAjIFNxdWFyZSBvZiAzIHBsdXMgNAot4oiYKMOXy5wpIDUgICMgTmVnYXRpdmUgc3F1YXJlIG9mIDU=">↗️</a><pre> <span class='Number'>3</span> <span class='Function'>×</span><span class='Modifier'>˜</span><span class='Modifier2'>∘</span><span class='Function'>+</span> <span class='Number'>4</span> <span class='Comment'># Square of 3 plus 4
diff --git a/docs/tutorial/index.html b/docs/tutorial/index.html
index 85a2431f..ded09fb1 100644
--- a/docs/tutorial/index.html
+++ b/docs/tutorial/index.html
@@ -25,7 +25,7 @@
<tr>
<td><a href="list.html">List manipulation</a></td>
<td>Lists, strings, and strands; pervasion</td>
-<td><code><span class='Function'>∾≍⌽↕</span><span class='Modifier'>¨´</span></code></td>
+<td><code><span class='Function'>∾⋈⌽↕</span><span class='Modifier'>¨´</span></code></td>
</tr>
<tr>
<td><a href="combinator.html">Combinators</a></td>
diff --git a/docs/tutorial/list.html b/docs/tutorial/list.html
index 1f62233c..4df69829 100644
--- a/docs/tutorial/list.html
+++ b/docs/tutorial/list.html
@@ -78,11 +78,13 @@
<span class='Number'>2</span><span class='Ligature'>‿</span><span class='Function'>+</span><span class='Ligature'>‿</span><span class='Function'>-</span>
</pre>
<p>Strand notation is shorter and looks less cluttered in this example. As with lists, anything goes in a strand, but if it's the result of a function or operator, or another strand, then it has to be put in parentheses first. With one set of parentheses, a strand will be just as long as the equivalent bracketed list, and with two you're better off using the list.</p>
-<p>An individual ligature part of BQN syntax, not a value, and it doesn't do something specific like a function does. It's the sequence of ligatures that makes whatever they join together into a list. So if we parenthesize either ligature below, we get a different result! Ligatures aren't right-associative or left-associative.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MOKAvzHigL8yCigw4oC/MSnigL8yCjDigL8oMeKAvzIp">↗️</a><pre> <span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>2</span>
+<p>An individual ligature is part of BQN syntax, not a value, and it doesn't do something specific like a function does. It's the sequence of ligatures that makes whatever they join together into a list. So if we parenthesize either ligature below, we get a different result! Ligatures aren't right-associative or left-associative.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MOKAvzHigL8yCgooMOKAvzEp4oC/MgoKMOKAvygx4oC/Mik=">↗️</a><pre> <span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>2</span>
⟨ 0 1 2 ⟩
+
<span class='Paren'>(</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Paren'>)</span><span class='Ligature'>‿</span><span class='Number'>2</span>
⟨ ⟨ 0 1 ⟩ 2 ⟩
+
<span class='Number'>0</span><span class='Ligature'>‿</span><span class='Paren'>(</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Paren'>)</span>
⟨ 0 ⟨ 1 2 ⟩ ⟩
</pre>
@@ -136,10 +138,10 @@
<h2 id="some-list-functions"><a class="header" href="#some-list-functions">Some list functions</a></h2>
<table class='primitives'>
<tr>
- <td><span class='Function'>≍</span></td>
+ <td><span class='Function'>⋈</span></td>
<td><kbd>\.</kbd></td>
- <td>Solo</td>
- <td>Couple</td>
+ <td>Enlist</td>
+ <td>Pair</td>
</tr>
<tr>
<td><span class='Function'>∾</span></td>
@@ -156,11 +158,11 @@
</table>
<p>Let's introduce a few primitives to work with lists.</p>
-<p>Make one or two atom arguments into a list with <code><span class='Function'>≍</span></code>, pronounced Solo in the one-argument case and Couple in the two-argument case. This might not seem to merit a symbol but there's more to come. Don't call it on lists and ponder the results, igniting a hunger for ever more dimensions.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4omNIDQKCjIg4omNIDQ=">↗️</a><pre> <span class='Function'>≍</span> <span class='Number'>4</span>
-⟨ 4 ⟩
+<p>Make one or two arguments into a list with <code><span class='Function'>⋈</span></code>, pronounced Enlist in the one-argument case and Pair in the two-argument case. This is kind of the same thing as list notation, and in fact I'd write the two examples below as list literals. But BQN is set up to get the most out of functions, so it's very useful to have a function version of that special syntax for lists built in.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4ouIICJlbHQiCgoyIOKLiCA0">↗️</a><pre> <span class='Function'>⋈</span> <span class='String'>&quot;elt&quot;</span>
+⟨ "elt" ⟩
- <span class='Number'>2</span> <span class='Function'>≍</span> <span class='Number'>4</span>
+ <span class='Number'>2</span> <span class='Function'>⋈</span> <span class='Number'>4</span>
⟨ 2 4 ⟩
</pre>
<p>Concatenate lists with Join To (<code><span class='Function'>∾</span></code>). The little chain link symbol—technically &quot;inverted lazy S&quot;—is my favorite in BQN. Hook those lists together!</p>
@@ -173,7 +175,7 @@
<span class='String'>&quot;plural&quot;</span> <span class='Function'>∾</span> <span class='String'>'s'</span>
"plurals"
</pre>
-<p>The last two examples show that you can join a list to an atom, making it the first or last element of the result. This is a little suspect because if you decide the data being stored is more complicated and start using a list instead of an atom, then it will no longer be used as a single element but rather a subsection of the result. So I would only use that shortcut for something like a numeric literal that's clearly an atom and will stay that way, and otherwise wrap those atomic arguments in some <code><span class='Bracket'>⟨⟩</span></code> brackets. Join will even work with two atoms, but in that case I'd say it makes more sense to use Couple instead.</p>
+<p>The last two examples show that you can join a list to an atom, making it the first or last element of the result. This is a little suspect because if you decide the data being stored is more complicated and start using a list instead of an atom, then it will no longer be used as a single element but rather a subsection of the result. So I would only use that shortcut for something like a numeric literal that's clearly an atom and will stay that way, and otherwise wrap those atomic arguments in some <code><span class='Bracket'>⟨⟩</span></code> brackets. Join will even work with two atoms, but in that case it makes more sense to use Pair instead.</p>
<p>Reverse (<code><span class='Function'>⌽</span></code>) puts the list back to front.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oy9ICJkcmF3ZXIi">↗️</a><pre> <span class='Function'>⌽</span> <span class='String'>&quot;drawer&quot;</span>
"reward"
@@ -205,13 +207,13 @@
</table>
<p>The 1-modifier Each (<code><span class='Modifier'>¨</span></code>) applies its operand to every element of a list argument: it's the same as <code><span class='Value'>map</span></code> in a functional programming language. With two list arguments (which have to have the same length), Each pairs the corresponding elements from each, a bit like a <code><span class='Value'>zip</span></code> function. If one argument is a list and one's an atom, the atom is reused every time instead.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oy9wqggImFiY2Qi4oC/IkFCQ0RFRiLigL8iMDEiCgoic3RyaW5nIuKAvyJsaXN0IuKAvyJhcnJheSIg4oi+wqggJ3MnCgoiYWJjIiDiiY3CqCDijL0gImFiYyI=">↗️</a><pre> <span class='Function'>⌽</span><span class='Modifier'>¨</span> <span class='String'>&quot;abcd&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;ABCDEF&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;01&quot;</span>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oy9wqggImFiY2Qi4oC/IkFCQ0RFRiLigL8iMDEiCgoic3RyaW5nIuKAvyJsaXN0IuKAvyJhcnJheSIg4oi+wqggJ3MnCgoiYWJjIiDii4jCqCDijL0gImFiYyI=">↗️</a><pre> <span class='Function'>⌽</span><span class='Modifier'>¨</span> <span class='String'>&quot;abcd&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;ABCDEF&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;01&quot;</span>
⟨ "dcba" "FEDCBA" "10" ⟩
<span class='String'>&quot;string&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;list&quot;</span><span class='Ligature'>‿</span><span class='String'>&quot;array&quot;</span> <span class='Function'>∾</span><span class='Modifier'>¨</span> <span class='String'>'s'</span>
⟨ "strings" "lists" "arrays" ⟩
- <span class='String'>&quot;abc&quot;</span> <span class='Function'>≍</span><span class='Modifier'>¨</span> <span class='Function'>⌽</span> <span class='String'>&quot;abc&quot;</span>
+ <span class='String'>&quot;abc&quot;</span> <span class='Function'>⋈</span><span class='Modifier'>¨</span> <span class='Function'>⌽</span> <span class='String'>&quot;abc&quot;</span>
⟨ "ac" "bb" "ca" ⟩
</pre>
<p>Fold (<code><span class='Modifier'>´</span></code>) is the higher-order function also known as reduce or accumulate. It applies its operand function between each pair of elements in a list argument. For example, <code><span class='Function'>+</span><span class='Modifier'>´</span></code> gives the sum of a list and <code><span class='Function'>×</span><span class='Modifier'>´</span></code> gives its product.</p>
@@ -232,7 +234,7 @@
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oi+wrQg4p+oICJjb24iLCAiY2F0IiwgImVuYXQiLCAiZSIg4p+p">↗️</a><pre> <span class='Function'>∾</span><span class='Modifier'>´</span> <span class='Bracket'>⟨</span> <span class='String'>&quot;con&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;cat&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;enat&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;e&quot;</span> <span class='Bracket'>⟩</span>
"concatenate"
</pre>
-<p>But you shouldn't! Just <code><span class='Function'>∾</span></code> will do the job for you—with no left argument it's just called &quot;Join&quot; (it's like Javascript's <code><span class='Value'>.join</span><span class='Paren'>()</span></code>, but with no separator and not specific to strings). And it could do more jobs if you had more dimensions. But I'm sure that's the furthest thing from your mind.</p>
+<p>But you shouldn't! Just <code><span class='Function'>∾</span></code> will do the job for you—with no left argument it's just called &quot;Join&quot; (it's like Javascript's <code><span class='Value'>.join</span><span class='Paren'>()</span></code>, but with no separator and not specific to strings). And it could do more jobs if you had more dimensions. But let's not push it.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oi+IOKfqCAiY29uIiwgImNhdCIsICJlbmF0IiwgImUiIOKfqQ==">↗️</a><pre> <span class='Function'>∾</span> <span class='Bracket'>⟨</span> <span class='String'>&quot;con&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;cat&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;enat&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;e&quot;</span> <span class='Bracket'>⟩</span>
"concatenate"
</pre>
@@ -258,7 +260,7 @@
⟨ 0 1 2 3 4 5 6 7 ⟩
</pre>
<p>Natural numbers in BQN start at 0. I'll get to the second function in a moment, but first let's consider how we'd decode just one number in binary. I'll pick a smaller one: 9 is 1001 in binary. Like the first 1 in decimal 1001 counts for one thousand or <code><span class='Number'>10</span><span class='Function'>⋆</span><span class='Number'>3</span></code>, the first one in binary 1001 counts for 8, which is <code><span class='Number'>2</span><span class='Function'>⋆</span><span class='Number'>3</span></code>. We can put each number next to its place value like this:</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=OOKAvzTigL8y4oC/MSDiiY3CqCAx4oC/MOKAvzDigL8x">↗️</a><pre> <span class='Number'>8</span><span class='Ligature'>‿</span><span class='Number'>4</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>1</span> <span class='Function'>≍</span><span class='Modifier'>¨</span> <span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=OOKAvzTigL8y4oC/MSDii4jCqCAx4oC/MOKAvzDigL8x">↗️</a><pre> <span class='Number'>8</span><span class='Ligature'>‿</span><span class='Number'>4</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>1</span> <span class='Function'>⋈</span><span class='Modifier'>¨</span> <span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span>
⟨ ⟨ 8 1 ⟩ ⟨ 4 0 ⟩ ⟨ 2 0 ⟩ ⟨ 1 1 ⟩ ⟩
</pre>
<p>To get the value we multiply each number by its place value and then add them up.</p>
@@ -410,9 +412,9 @@ ERROR
<td><a href="../doc/join.html">Join To</a></td>
</tr>
<tr>
-<td><code><span class='Function'>≍</span></code></td>
-<td><a href="../doc/couple.html">Solo</a></td>
-<td><a href="../doc/couple.html">Couple</a></td>
+<td><code><span class='Function'>⋈</span></code></td>
+<td><a href="../doc/pair.html">Enlist</a></td>
+<td><a href="../doc/pair.html">Pair</a></td>
</tr>
<tr>
<td><code><span class='Function'>⌽</span></code></td>
diff --git a/docs/tutorial/variable.html b/docs/tutorial/variable.html
index 226b54ae..634bd5d5 100644
--- a/docs/tutorial/variable.html
+++ b/docs/tutorial/variable.html
@@ -14,13 +14,13 @@
<p>Like that.</p>
<h2 id="defining-variables"><a class="header" href="#defining-variables">Defining variables</a></h2>
<p>BQN uses the left-pointing arrow <code><span class='Gets'>←</span></code> to define variables, as shown above. Most of the time it's best to use it in a plain way, with just the name and its definition, but it's also possible to define multiple variables using list notation, or to define a variable as part of a larger expression that continues to the left (in terms of precedence, <code><span class='Gets'>←</span></code> behaves like a function, but it isn't one—it's a part of syntax).</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=cGnigL9l4oC/dGVuIOKGkCDin6ggz4AsIOKLhjEsIDEwIOKfqQoKdGVuIMOXIHBpCgp0aHJlZSDiiY0gdGVuIC0gdGhyZWUg4oaQIDM=">↗️</a><pre> <span class='Value'>pi</span><span class='Ligature'>‿</span><span class='Value'>e</span><span class='Ligature'>‿</span><span class='Value'>ten</span> <span class='Gets'>←</span> <span class='Bracket'>⟨</span> <span class='Number'>π</span><span class='Separator'>,</span> <span class='Function'>⋆</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>10</span> <span class='Bracket'>⟩</span>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=cGnigL9l4oC/dGVuIOKGkCDin6ggz4AsIOKLhjEsIDEwIOKfqQoKdGVuIMOXIHBpCgp0aHJlZSDii4ggdGVuIC0gdGhyZWUg4oaQIDM=">↗️</a><pre> <span class='Value'>pi</span><span class='Ligature'>‿</span><span class='Value'>e</span><span class='Ligature'>‿</span><span class='Value'>ten</span> <span class='Gets'>←</span> <span class='Bracket'>⟨</span> <span class='Number'>π</span><span class='Separator'>,</span> <span class='Function'>⋆</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>10</span> <span class='Bracket'>⟩</span>
⟨ 3.141592653589793 2.718281828459045 10 ⟩
<span class='Value'>ten</span> <span class='Function'>×</span> <span class='Value'>pi</span>
31.41592653589793
- <span class='Value'>three</span> <span class='Function'>≍</span> <span class='Value'>ten</span> <span class='Function'>-</span> <span class='Value'>three</span> <span class='Gets'>←</span> <span class='Number'>3</span>
+ <span class='Value'>three</span> <span class='Function'>⋈</span> <span class='Value'>ten</span> <span class='Function'>-</span> <span class='Value'>three</span> <span class='Gets'>←</span> <span class='Number'>3</span>
⟨ 3 7 ⟩
</pre>
<p>A variable can't be defined twice in the same <em>scope</em>. Later we'll work with functions and other pieces of code that create their own scopes, but for now all you need to know is that all the code in a tutorial runs in the same scope. So <code><span class='Value'>three</span></code> is already defined, and can't be defined again.</p>
@@ -194,7 +194,7 @@ ERROR
</svg>
<p>Well, the function Pick (<code><span class='Function'>⊑</span></code>) isn't doing anything too special here: the left argument is an index and it picks the element at that index from the right argument (which has to be a list, although there's a more complicated case with a compound left argument that we won't talk about now). Elements of a list are numbered starting at 0. This matches with the Range (<code><span class='Function'>↕</span></code>) function we saw earlier, in that the value of Range's result at a particular index is equal to that index. As an illustration, we can pair up each element of a list with its index by calling Range on the list's length.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KOKGlTMpIOKJjcKoICJCUU4iCgoxIOKKkSAiQlFOIg==">↗️</a><pre> <span class='Paren'>(</span><span class='Function'>↕</span><span class='Number'>3</span><span class='Paren'>)</span> <span class='Function'>≍</span><span class='Modifier'>¨</span> <span class='String'>&quot;BQN&quot;</span>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KOKGlTMpIOKLiMKoICJCUU4iCgoxIOKKkSAiQlFOIg==">↗️</a><pre> <span class='Paren'>(</span><span class='Function'>↕</span><span class='Number'>3</span><span class='Paren'>)</span> <span class='Function'>⋈</span><span class='Modifier'>¨</span> <span class='String'>&quot;BQN&quot;</span>
⟨ ⟨ 0 'B' ⟩ ⟨ 1 'Q' ⟩ ⟨ 2 'N' ⟩ ⟩
<span class='Number'>1</span> <span class='Function'>⊑</span> <span class='String'>&quot;BQN&quot;</span>
diff --git a/tutorial/README.md b/tutorial/README.md
index d8af90d0..98813365 100644
--- a/tutorial/README.md
+++ b/tutorial/README.md
@@ -11,6 +11,6 @@ The tutorials available so far:
| Tutorial | Concepts | Primitives
|------------------------------|----------|-----------
| [Expressions](expression.md) | Arithmetic, syntax, affine characters | `+-×÷⋆√˜⁼˙∘`
-| [List manipulation](list.md) | Lists, strings, and strands; pervasion | `∾≍⌽↕¨´`
+| [List manipulation](list.md) | Lists, strings, and strands; pervasion | `∾⋈⌽↕¨´`
| [Combinators](combinator.md) | Tacit programming, booleans | `<>≠=≤≥≡≢○⊸⟜`
| [Variables](variable.md) | Declarations, cross-roles | `∧∨¬⊣⊢↑↓«»⌾`
diff --git a/tutorial/combinator.md b/tutorial/combinator.md
index 77c77d8c..7ae8237c 100644
--- a/tutorial/combinator.md
+++ b/tutorial/combinator.md
@@ -151,10 +151,10 @@ This is a very common pattern, and a sensible language should have a better way
"string" =○≠ "sting"
-Let's use the list formation function Solo/Couple (`≍`) to see what happens more clearly:
+Let's use the list formation function Enlist/Pair (`⋈`) to see what happens more clearly:
- "string" ≍○≠ "sting"
- ≍○≠ "sting"
+ "string" ⋈○≠ "sting"
+ ⋈○≠ "sting"
Atop always applies its right operand once, passing every argument (that is, one or two of them) in that call. Over calls its right operand on each argument individually. The results are then all used as arguments to the left operand. If there's only one argument, Atop and Over turn out to be the same: both of them call the right operand, then the left, like ordinary mathematical composition. Here are the two together for comparison.
diff --git a/tutorial/expression.md b/tutorial/expression.md
index a73a89fd..152c723a 100644
--- a/tutorial/expression.md
+++ b/tutorial/expression.md
@@ -181,7 +181,7 @@ Another 1-modifier, which at the moment is tremendously useless, is Constant `˙
Well, I guess it's not pedagogically useless, as it does demonstrate that a modifier can be applied to subjects as well as functions. Even though `3` is a subject, `3˙` is a function, and can be applied to and ignore the two arguments `2` and `4`.
-With three examples you may have noticed that 1-modifiers tend to cluster at the top of the screen. In fact, every primitive 1-modifer is a superscript character: we've covered `˜⁼˙`, and the remaining array-based modifiers `` ˘¨⌜´˝` `` will show up later.
+With three examples you may have noticed that 1-modifiers tend to cluster at the top of the line. In fact, every primitive 1-modifer is a superscript character: we've covered `˜⁼˙`, and the remaining array-based modifiers `` ˘¨⌜´˝` `` will show up later.
## 2-modifiers
diff --git a/tutorial/list.md b/tutorial/list.md
index af388154..94ef4026 100644
--- a/tutorial/list.md
+++ b/tutorial/list.md
@@ -48,10 +48,12 @@ Finally, *strand notation* is a shortcut for simple lists, like one that just li
Strand notation is shorter and looks less cluttered in this example. As with lists, anything goes in a strand, but if it's the result of a function or operator, or another strand, then it has to be put in parentheses first. With one set of parentheses, a strand will be just as long as the equivalent bracketed list, and with two you're better off using the list.
-An individual ligature part of BQN syntax, not a value, and it doesn't do something specific like a function does. It's the sequence of ligatures that makes whatever they join together into a list. So if we parenthesize either ligature below, we get a different result! Ligatures aren't right-associative or left-associative.
+An individual ligature is part of BQN syntax, not a value, and it doesn't do something specific like a function does. It's the sequence of ligatures that makes whatever they join together into a list. So if we parenthesize either ligature below, we get a different result! Ligatures aren't right-associative or left-associative.
0‿1‿2
+
(0‿1)‿2
+
0‿(1‿2)
## BQN types
@@ -111,15 +113,15 @@ This list application works recursively, so that lists of lists (and so on) are
## Some list functions
<!--GEN
-Primitives ⟨"≍%.%Solo%Couple", "∾%,%%Join To", "⌽%q%Reverse%Rotate"⟩
+Primitives ⟨"⋈%.%Enlist%Pair", "∾%,%%Join To", "⌽%q%Reverse%Rotate"⟩
-->
Let's introduce a few primitives to work with lists.
-Make one or two atom arguments into a list with `≍`, pronounced Solo in the one-argument case and Couple in the two-argument case. This might not seem to merit a symbol but there's more to come. Don't call it on lists and ponder the results, igniting a hunger for ever more dimensions.
+Make one or two arguments into a list with `⋈`, pronounced Enlist in the one-argument case and Pair in the two-argument case. This is kind of the same thing as list notation, and in fact I'd write the two examples below as list literals. But BQN is set up to get the most out of functions, so it's very useful to have a function version of that special syntax for lists built in.
- ≍ 4
+ ⋈ "elt"
- 2 ≍ 4
+ 2 ⋈ 4
Concatenate lists with Join To (`∾`). The little chain link symbol—technically "inverted lazy S"—is my favorite in BQN. Hook those lists together!
@@ -129,7 +131,7 @@ Concatenate lists with Join To (`∾`). The little chain link symbol—technical
"plural" ∾ 's'
-The last two examples show that you can join a list to an atom, making it the first or last element of the result. This is a little suspect because if you decide the data being stored is more complicated and start using a list instead of an atom, then it will no longer be used as a single element but rather a subsection of the result. So I would only use that shortcut for something like a numeric literal that's clearly an atom and will stay that way, and otherwise wrap those atomic arguments in some `⟨⟩` brackets. Join will even work with two atoms, but in that case I'd say it makes more sense to use Couple instead.
+The last two examples show that you can join a list to an atom, making it the first or last element of the result. This is a little suspect because if you decide the data being stored is more complicated and start using a list instead of an atom, then it will no longer be used as a single element but rather a subsection of the result. So I would only use that shortcut for something like a numeric literal that's clearly an atom and will stay that way, and otherwise wrap those atomic arguments in some `⟨⟩` brackets. Join will even work with two atoms, but in that case it makes more sense to use Pair instead.
Reverse (`⌽`) puts the list back to front.
@@ -151,7 +153,7 @@ The 1-modifier Each (`¨`) applies its operand to every element of a list argume
"string"‿"list"‿"array" ∾¨ 's'
- "abc" ≍¨ ⌽ "abc"
+ "abc" ⋈¨ ⌽ "abc"
Fold (`´`) is the higher-order function also known as reduce or accumulate. It applies its operand function between each pair of elements in a list argument. For example, `+´` gives the sum of a list and `×´` gives its product.
@@ -171,7 +173,7 @@ You can fold with the Join To function to join several lists together:
∾´ ⟨ "con", "cat", "enat", "e" ⟩
-But you shouldn't! Just `∾` will do the job for you—with no left argument it's just called "Join" (it's like Javascript's `.join()`, but with no separator and not specific to strings). And it could do more jobs if you had more dimensions. But I'm sure that's the furthest thing from your mind.
+But you shouldn't! Just `∾` will do the job for you—with no left argument it's just called "Join" (it's like Javascript's `.join()`, but with no separator and not specific to strings). And it could do more jobs if you had more dimensions. But let's not push it.
∾ ⟨ "con", "cat", "enat", "e" ⟩
@@ -188,7 +190,7 @@ Almost. It's really close. There are just two things missing, so I'll cover thos
Natural numbers in BQN start at 0. I'll get to the second function in a moment, but first let's consider how we'd decode just one number in binary. I'll pick a smaller one: 9 is 1001 in binary. Like the first 1 in decimal 1001 counts for one thousand or `10⋆3`, the first one in binary 1001 counts for 8, which is `2⋆3`. We can put each number next to its place value like this:
- 8‿4‿2‿1 ≍¨ 1‿0‿0‿1
+ 8‿4‿2‿1 ⋈¨ 1‿0‿0‿1
To get the value we multiply each number by its place value and then add them up.
@@ -262,7 +264,7 @@ We introduced a few new primitives. The links below go to the full documentation
Glyph | 1 arg | 2 args
------|------------------------------|--------
`∾` | [Join](../doc/join.md) | [Join To](../doc/join.md)
-`≍` | [Solo](../doc/couple.md) | [Couple](../doc/couple.md)
+`⋈` | [Enlist](../doc/pair.md) | [Pair](../doc/pair.md)
`⌽` | [Reverse](../doc/reverse.md) | [Rotate](../doc/reverse.md#rotate)
`↕` | [Range](../doc/range.md) |
`¨` | [Each](../doc/map.md) | [Each](../doc/map.md#each)
diff --git a/tutorial/variable.md b/tutorial/variable.md
index 71f28789..0945ece9 100644
--- a/tutorial/variable.md
+++ b/tutorial/variable.md
@@ -18,7 +18,7 @@ BQN uses the left-pointing arrow `←` to define variables, as shown above. Most
ten × pi
- three ≍ ten - three ← 3
+ three ⋈ ten - three ← 3
A variable can't be defined twice in the same *scope*. Later we'll work with functions and other pieces of code that create their own scopes, but for now all you need to know is that all the code in a tutorial runs in the same scope. So `three` is already defined, and can't be defined again.
@@ -122,7 +122,7 @@ DrawEval "-⟜1⌾(2⊸⊑) ""BQN"""
Well, the function Pick (`⊑`) isn't doing anything too special here: the left argument is an index and it picks the element at that index from the right argument (which has to be a list, although there's a more complicated case with a compound left argument that we won't talk about now). Elements of a list are numbered starting at 0. This matches with the Range (`↕`) function we saw earlier, in that the value of Range's result at a particular index is equal to that index. As an illustration, we can pair up each element of a list with its index by calling Range on the list's length.
- (↕3) ≍¨ "BQN"
+ (↕3) ⋈¨ "BQN"
1 ⊑ "BQN"