aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-29 17:48:16 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-29 17:48:16 -0500
commit224d6ed83efb86fa16ac802af65c63d1b97543e2 (patch)
treec7f53ccc2d752668d252494e3f648eef1107e2a9
parent9cfc45f731a121282f47218d6ab80c5b9b06e277 (diff)
More detail in a few help pages
-rw-r--r--docs/help/depth.html7
-rw-r--r--docs/help/leftargument.html12
-rw-r--r--docs/help/length_notequals.html1
-rw-r--r--docs/help/merge_greaterthan.html5
-rw-r--r--docs/help/nothing.html8
-rw-r--r--docs/help/rank.html2
-rw-r--r--docs/help/rank_equals.html1
-rw-r--r--help/depth.md4
-rw-r--r--help/leftargument.md8
-rw-r--r--help/length_notequals.md2
-rw-r--r--help/merge_greaterthan.md6
-rw-r--r--help/nothing.md8
-rw-r--r--help/rank.md2
-rw-r--r--help/rank_equals.md2
14 files changed, 51 insertions, 17 deletions
diff --git a/docs/help/depth.html b/docs/help/depth.html
index 03fcaea6..4657a433 100644
--- a/docs/help/depth.html
+++ b/docs/help/depth.html
@@ -7,10 +7,13 @@
<h1 id="circle-with-two-dots-"><a class="header" href="#circle-with-two-dots-">Circle With Two Dots (<code><span class='Modifier2'>βš‡</span></code>)</a></h1>
<h2 id="π”½π•˜-𝕩-𝕨-π”½π•˜-𝕩-depth"><a class="header" href="#π”½π•˜-𝕩-𝕨-π”½π•˜-𝕩-depth"><code><span class='Function'>𝔽</span><span class='Modifier2'>βš‡</span><span class='Value'>π•˜</span> <span class='Value'>𝕩</span></code>, <code><span class='Value'>𝕨</span> <span class='Function'>𝔽</span><span class='Modifier2'>βš‡</span><span class='Value'>π•˜</span> <span class='Value'>𝕩</span></code>: Depth</a></h2>
<p><a class="fulldoc" href="../doc/depth.html#the-depth-modifier">β†’full documentation</a></p>
-<p>Apply <code><span class='Function'>𝔽</span></code> to the cells of the arguments at depth given in <code><span class='Value'>π•˜</span></code>.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MeKKuOKGk+KahzEg4p+o4p+oMSwyLDPin6ksIOKfqDQsNSw24p+p4p+pCgoxIOKGk+KahzEg4p+o4p+oMSwyLDPin6ksIOKfqDQsNSw24p+p4p+p">↗️</a><pre> <span class='Number'>1</span><span class='Modifier2'>⊸</span><span class='Function'>↓</span><span class='Modifier2'>βš‡</span><span class='Number'>1</span> <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><span class='Separator'>,</span> <span class='Bracket'>⟨</span><span class='Number'>4</span><span class='Separator'>,</span><span class='Number'>5</span><span class='Separator'>,</span><span class='Number'>6</span><span class='Bracket'>⟩⟩</span>
+<p>Apply <code><span class='Function'>𝔽</span></code> to the cells of the arguments at depth given in <code><span class='Value'>π•˜</span></code>. Negative numbers count down from the top level and non-negative ones from the bottom up.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MeKKuOKGk+KahzEg4p+o4p+oMSwyLDPin6ksIOKfqDQsNSw24p+p4p+pCgoxIOKGk+KahzEg4p+o4p+oMSwyLDPin6ksIOKfqDQsNSw24p+p4p+pCgooK8K04oaVKeKahzAg4p+oMiw04oC/Nywz4p+pICAjIEltcGxlbWVudHMgcGVydmFzaW9u">↗️</a><pre> <span class='Number'>1</span><span class='Modifier2'>⊸</span><span class='Function'>↓</span><span class='Modifier2'>βš‡</span><span class='Number'>1</span> <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><span class='Separator'>,</span> <span class='Bracket'>⟨</span><span class='Number'>4</span><span class='Separator'>,</span><span class='Number'>5</span><span class='Separator'>,</span><span class='Number'>6</span><span class='Bracket'>⟩⟩</span>
⟨ ⟨ 2 3 ⟩ ⟨ 5 6 ⟩ ⟩
<span class='Number'>1</span> <span class='Function'>↓</span><span class='Modifier2'>βš‡</span><span class='Number'>1</span> <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><span class='Separator'>,</span> <span class='Bracket'>⟨</span><span class='Number'>4</span><span class='Separator'>,</span><span class='Number'>5</span><span class='Separator'>,</span><span class='Number'>6</span><span class='Bracket'>⟩⟩</span>
⟨ ⟨ 2 3 ⟩ ⟨ 5 6 ⟩ ⟩
+
+ <span class='Paren'>(</span><span class='Function'>+</span><span class='Modifier'>Β΄</span><span class='Function'>↕</span><span class='Paren'>)</span><span class='Modifier2'>βš‡</span><span class='Number'>0</span> <span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Separator'>,</span><span class='Number'>4</span><span class='Ligature'>β€Ώ</span><span class='Number'>7</span><span class='Separator'>,</span><span class='Number'>3</span><span class='Bracket'>⟩</span> <span class='Comment'># Implements pervasion
+</span>⟨ 1 ⟨ 6 21 ⟩ 3 ⟩
</pre>
diff --git a/docs/help/leftargument.html b/docs/help/leftargument.html
index 2c92de98..58c60486 100644
--- a/docs/help/leftargument.html
+++ b/docs/help/leftargument.html
@@ -8,6 +8,16 @@
<h2 id="𝕨-left-argument"><a class="header" href="#𝕨-left-argument"><code><span class='Value'>𝕨</span></code>: Left Argument</a></h2>
<p><a class="fulldoc" href="../doc/syntax.html#blocks">β†’full documentation</a></p>
<p>A variable assigned to the left argument of a block. <code><span class='Function'>π•Ž</span></code> can be used to access the left argument as a function.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSB78J2VqH0gMQ==">↗️</a><pre> <span class='Number'>5</span> <span class='Brace'>{</span><span class='Value'>𝕨</span><span class='Brace'>}</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=NSB78J2VqH0gMQoKLeKAv8O3IHvwnZWO8J2VqX3CqCA0">↗️</a><pre> <span class='Number'>5</span> <span class='Brace'>{</span><span class='Value'>𝕨</span><span class='Brace'>}</span> <span class='Number'>1</span>
5
+
+ <span class='Function'>-</span><span class='Ligature'>β€Ώ</span><span class='Function'>Γ·</span> <span class='Brace'>{</span><span class='Function'>π•Ž</span><span class='Value'>𝕩</span><span class='Brace'>}</span><span class='Modifier'>Β¨</span> <span class='Number'>4</span>
+⟨ ¯4 0.25 ⟩
+</pre>
+<p>In a call with no left argument, <code><span class='Value'>𝕨</span></code> functions as <a href="nothing.html">Nothing</a> and <code><span class='Function'>π•Ž</span></code> can't be used.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=eygt8J2VqCnii4jwnZWpfSA2CgoyIHsoLfCdlagp4ouI8J2VqX0gNg==">↗️</a><pre> <span class='Brace'>{</span><span class='Paren'>(</span><span class='Function'>-</span><span class='Value'>𝕨</span><span class='Paren'>)</span><span class='Function'>β‹ˆ</span><span class='Value'>𝕩</span><span class='Brace'>}</span> <span class='Number'>6</span>
+⟨ 6 ⟩
+
+ <span class='Number'>2</span> <span class='Brace'>{</span><span class='Paren'>(</span><span class='Function'>-</span><span class='Value'>𝕨</span><span class='Paren'>)</span><span class='Function'>β‹ˆ</span><span class='Value'>𝕩</span><span class='Brace'>}</span> <span class='Number'>6</span>
+⟨ ¯2 6 ⟩
</pre>
diff --git a/docs/help/length_notequals.html b/docs/help/length_notequals.html
index 3667e2fe..9efb3a35 100644
--- a/docs/help/length_notequals.html
+++ b/docs/help/length_notequals.html
@@ -25,6 +25,7 @@
</pre>
<h2 id="𝕨--𝕩-not-equal-to"><a class="header" href="#𝕨--𝕩-not-equal-to"><code><span class='Value'>𝕨</span> <span class='Function'>β‰ </span> <span class='Value'>𝕩</span></code>: Not Equal To</a></h2>
<p><a class="fulldoc" href="../doc/arithmetic.html#comparisons">β†’full documentation</a></p>
+<p>Do argument atoms not match?</p>
<p><a href="../doc/arithmetic.html#pervasion">Pervasive.</a></p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MSDiiaAgMwoKMuKAvzPigL8wIOKJoCAz4oC/MeKAvzAKCidhJyDiiaAgJ2En">↗️</a><pre> <span class='Number'>1</span> <span class='Function'>β‰ </span> <span class='Number'>3</span>
1
diff --git a/docs/help/merge_greaterthan.html b/docs/help/merge_greaterthan.html
index c0b21032..da588aa8 100644
--- a/docs/help/merge_greaterthan.html
+++ b/docs/help/merge_greaterthan.html
@@ -7,9 +7,8 @@
<h1 id="greater-than-"><a class="header" href="#greater-than-">Greater Than (<code><span class='Function'>&gt;</span></code>)</a></h1>
<h2 id="-𝕩-merge"><a class="header" href="#-𝕩-merge"><code><span class='Function'>&gt;</span> <span class='Value'>𝕩</span></code>: Merge</a></h2>
<p><a class="fulldoc" href="../doc/couple.html">β†’full documentation</a></p>
-<p>Add the rank of an element of <code><span class='Value'>𝕩</span></code> to the rank of <code><span class='Value'>𝕩</span></code>.</p>
-<p>All elements must have the same rank.</p>
-<p>Returns atomic values as is.</p>
+<p>Combine an array of arrays into one array. All elements of <code><span class='Value'>𝕩</span></code> must have the same rank, and the result rank is that plus the rank of <code><span class='Value'>𝕩</span></code>.</p>
+<p>Returns and boxed atoms unchanged.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=YSDihpAg4p+o4p+oMSwgMuKfqSwg4p+oMywgNOKfqeKfqQoKPmEKCuKJomEKCuKJoj5h">↗️</a><pre> <span class='Value'>a</span> <span class='Gets'>←</span> <span class='Bracket'>⟨⟨</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>2</span><span class='Bracket'>⟩</span><span class='Separator'>,</span> <span class='Bracket'>⟨</span><span class='Number'>3</span><span class='Separator'>,</span> <span class='Number'>4</span><span class='Bracket'>⟩⟩</span>
<span class='Function'>&gt;</span><span class='Value'>a</span>
diff --git a/docs/help/nothing.html b/docs/help/nothing.html
index b83a26c4..f4361a83 100644
--- a/docs/help/nothing.html
+++ b/docs/help/nothing.html
@@ -7,6 +7,10 @@
<h1 id="middle-dot-"><a class="header" href="#middle-dot-">Middle Dot (<code><span class='Nothing'>Β·</span></code>)</a></h1>
<h2 id="-nothing"><a class="header" href="#-nothing"><code><span class='Nothing'>Β·</span></code>: Nothing</a></h2>
<p><a class="fulldoc" href="../doc/expression.html#nothing">β†’full documentation</a></p>
+<p>Indicates no value. If a left argument is Nothing, the function is called with no left argument, and if the right is Nothing, it's not called and &quot;returns&quot; Nothing.</p>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=wrcg4oy9ICJhYmMiICAjIFJldmVyc2UgaW5zdGVhZCBvZiBSb3RhdGU=">↗️</a><pre> <span class='Nothing'>Β·</span> <span class='Function'>⌽</span> <span class='String'>&quot;abc&quot;</span> <span class='Comment'># Reverse instead of Rotate
+</span>"cba"
+</pre>
<h3 id="in-trains"><a class="header" href="#in-trains">In Trains</a></h3>
<p>Nothing can serve as a left argument in a train to string together multiple monadic functions.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KC0rLSkgNQoKKC3CtystKSA1">↗️</a><pre> <span class='Paren'>(</span><span class='Function'>-+-</span><span class='Paren'>)</span> <span class='Number'>5</span>
@@ -15,8 +19,8 @@
<span class='Paren'>(</span><span class='Function'>-</span><span class='Nothing'>Β·</span><span class='Function'>+-</span><span class='Paren'>)</span> <span class='Number'>5</span>
5
</pre>
-<h3 id="in-block-headers"><a class="header" href="#in-block-headers">In Block Headers</a></h3>
-<p>For Block header pattern matching syntax, Nothing can be used to indicate an unused value.</p>
+<h3 id="destructuring"><a class="header" href="#destructuring">Destructuring</a></h3>
+<p>For pattern matching in assignment or a block header, Nothing indicates an unused value.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=RiDihpAge/CdlYogYeKAv8K34oC/YjogYeKIvmJ9CgpGIDHigL8y4oC/Mw==">↗️</a><pre> <span class='Function'>F</span> <span class='Gets'>←</span> <span class='Brace'>{</span><span class='Function'>π•Š</span> <span class='Value'>a</span><span class='Ligature'>β€Ώ</span><span class='Nothing'>Β·</span><span class='Ligature'>β€Ώ</span><span class='Value'>b</span><span class='Head'>:</span> <span class='Value'>a</span><span class='Function'>∾</span><span class='Value'>b</span><span class='Brace'>}</span>
<span class='Function'>F</span> <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/help/rank.html b/docs/help/rank.html
index 1789d21f..e296e97a 100644
--- a/docs/help/rank.html
+++ b/docs/help/rank.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="circled-horizontal-bar-with-notch-"><a class="header" href="#circled-horizontal-bar-with-notch-">Circled Horizontal Bar With Notch (<code><span class='Modifier2'>βŽ‰</span></code>)</a></h1>
<h2 id="π”½π•˜-𝕩-𝕨-π”½π•˜-𝕩-rank"><a class="header" href="#π”½π•˜-𝕩-𝕨-π”½π•˜-𝕩-rank"><code><span class='Function'>𝔽</span><span class='Modifier2'>βŽ‰</span><span class='Value'>π•˜</span> <span class='Value'>𝕩</span></code>, <code><span class='Value'>𝕨</span> <span class='Function'>𝔽</span><span class='Modifier2'>βŽ‰</span><span class='Value'>π•˜</span> <span class='Value'>𝕩</span></code>: Rank</a></h2>
-<p>Apply <code><span class='Function'>𝔽</span></code> to cells at ranks given in <code><span class='Value'>π•˜</span></code>.</p>
+<p>Apply <code><span class='Function'>𝔽</span></code> to cells at ranks given in <code><span class='Value'>π•˜</span></code>. Non-negative numbers indicate the rank of the cell and negative ones indicate the difference from full rank.</p>
<p>The ranks applied are given by the following:</p>
<ul>
<li><code><span class='Modifier2'>βŽ‰</span> <span class='Value'>c</span></code> Rank-c cells of <code><span class='Value'>𝕩</span></code> (monadic) or both arguments (dyadic)</li>
diff --git a/docs/help/rank_equals.html b/docs/help/rank_equals.html
index bd5b3727..65313deb 100644
--- a/docs/help/rank_equals.html
+++ b/docs/help/rank_equals.html
@@ -34,6 +34,7 @@
</pre>
<h2 id="𝕨--𝕩-equal-to"><a class="header" href="#𝕨--𝕩-equal-to"><code><span class='Value'>𝕨</span> <span class='Function'>=</span> <span class='Value'>𝕩</span></code>: Equal To</a></h2>
<p><a class="fulldoc" href="../doc/arithmetic.html#comparisons">β†’full documentation</a></p>
+<p>Do argument atoms match?</p>
<p><a href="../doc/arithmetic.html#pervasion">Pervasive.</a></p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MSA9IDMKCjLigL8z4oC/MCA9IDPigL8x4oC/MAoKJ2EnID0gJ2En">↗️</a><pre> <span class='Number'>1</span> <span class='Function'>=</span> <span class='Number'>3</span>
0
diff --git a/help/depth.md b/help/depth.md
index 8c0d4367..bbe4d297 100644
--- a/help/depth.md
+++ b/help/depth.md
@@ -5,9 +5,11 @@
## `π”½βš‡π•˜ 𝕩`, `𝕨 π”½βš‡π•˜ 𝕩`: Depth
[β†’full documentation](../doc/depth.md#the-depth-modifier)
-Apply `𝔽` to the cells of the arguments at depth given in `π•˜`.
+Apply `𝔽` to the cells of the arguments at depth given in `π•˜`. Negative numbers count down from the top level and non-negative ones from the bottom up.
1βŠΈβ†“βš‡1 ⟨⟨1,2,3⟩, ⟨4,5,6⟩⟩
1 β†“βš‡1 ⟨⟨1,2,3⟩, ⟨4,5,6⟩⟩
+
+ (+´↕)βš‡0 ⟨2,4β€Ώ7,3⟩ # Implements pervasion
diff --git a/help/leftargument.md b/help/leftargument.md
index f8031f26..bda7fedc 100644
--- a/help/leftargument.md
+++ b/help/leftargument.md
@@ -8,3 +8,11 @@
A variable assigned to the left argument of a block. `π•Ž` can be used to access the left argument as a function.
5 {𝕨} 1
+
+ -β€ΏΓ· {π•Žπ•©}Β¨ 4
+
+In a call with no left argument, `𝕨` functions as [Nothing](nothing.md) and `π•Ž` can't be used.
+
+ {(-𝕨)β‹ˆπ•©} 6
+
+ 2 {(-𝕨)β‹ˆπ•©} 6
diff --git a/help/length_notequals.md b/help/length_notequals.md
index 5d17237c..e13a14fe 100644
--- a/help/length_notequals.md
+++ b/help/length_notequals.md
@@ -23,6 +23,8 @@ Length of the first dimension of `𝕩`.
## `𝕨 β‰  𝕩`: Not Equal To
[β†’full documentation](../doc/arithmetic.md#comparisons)
+Do argument atoms not match?
+
[Pervasive.](../doc/arithmetic.md#pervasion)
1 β‰  3
diff --git a/help/merge_greaterthan.md b/help/merge_greaterthan.md
index ee315fca..e78c063a 100644
--- a/help/merge_greaterthan.md
+++ b/help/merge_greaterthan.md
@@ -5,11 +5,9 @@
## `> 𝕩`: Merge
[β†’full documentation](../doc/couple.md)
-Add the rank of an element of `𝕩` to the rank of `𝕩`.
+Combine an array of arrays into one array. All elements of `𝕩` must have the same rank, and the result rank is that plus the rank of `𝕩`.
-All elements must have the same rank.
-
-Returns atomic values as is.
+Returns and boxed atoms unchanged.
a ← ⟨⟨1, 2⟩, ⟨3, 4⟩⟩
diff --git a/help/nothing.md b/help/nothing.md
index 0a5ad783..23aee6ba 100644
--- a/help/nothing.md
+++ b/help/nothing.md
@@ -5,6 +5,10 @@
## `Β·`: Nothing
[β†’full documentation](../doc/expression.md#nothing)
+Indicates no value. If a left argument is Nothing, the function is called with no left argument, and if the right is Nothing, it's not called and "returns" Nothing.
+
+ · ⌽ "abc" # Reverse instead of Rotate
+
### In Trains
Nothing can serve as a left argument in a train to string together multiple monadic functions.
@@ -13,9 +17,9 @@ Nothing can serve as a left argument in a train to string together multiple mona
(-Β·+-) 5
-### In Block Headers
+### Destructuring
-For Block header pattern matching syntax, Nothing can be used to indicate an unused value.
+For pattern matching in assignment or a block header, Nothing indicates an unused value.
F ← {π•Š aβ€ΏΒ·β€Ώb: a∾b}
diff --git a/help/rank.md b/help/rank.md
index 8f9e83ac..a3dddaf5 100644
--- a/help/rank.md
+++ b/help/rank.md
@@ -4,7 +4,7 @@
## `π”½βŽ‰π•˜ 𝕩`, `𝕨 π”½βŽ‰π•˜ 𝕩`: Rank
-Apply `𝔽` to cells at ranks given in `π•˜`.
+Apply `𝔽` to cells at ranks given in `π•˜`. Non-negative numbers indicate the rank of the cell and negative ones indicate the difference from full rank.
The ranks applied are given by the following:
diff --git a/help/rank_equals.md b/help/rank_equals.md
index 0f41f6fa..ed590408 100644
--- a/help/rank_equals.md
+++ b/help/rank_equals.md
@@ -21,6 +21,8 @@ Returns the number of dimensions in `𝕩`.
## `𝕨 = 𝕩`: Equal To
[β†’full documentation](../doc/arithmetic.md#comparisons)
+Do argument atoms match?
+
[Pervasive.](../doc/arithmetic.md#pervasion)
1 = 3