diff options
| -rw-r--r-- | docs/help/depth.html | 7 | ||||
| -rw-r--r-- | docs/help/leftargument.html | 12 | ||||
| -rw-r--r-- | docs/help/length_notequals.html | 1 | ||||
| -rw-r--r-- | docs/help/merge_greaterthan.html | 5 | ||||
| -rw-r--r-- | docs/help/nothing.html | 8 | ||||
| -rw-r--r-- | docs/help/rank.html | 2 | ||||
| -rw-r--r-- | docs/help/rank_equals.html | 1 | ||||
| -rw-r--r-- | help/depth.md | 4 | ||||
| -rw-r--r-- | help/leftargument.md | 8 | ||||
| -rw-r--r-- | help/length_notequals.md | 2 | ||||
| -rw-r--r-- | help/merge_greaterthan.md | 6 | ||||
| -rw-r--r-- | help/nothing.md | 8 | ||||
| -rw-r--r-- | help/rank.md | 2 | ||||
| -rw-r--r-- | help/rank_equals.md | 2 |
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'>></span></code>)</a></h1> <h2 id="-π©-merge"><a class="header" href="#-π©-merge"><code><span class='Function'>></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'>></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 "returns" 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'>"abc"</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 |
