diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-19 15:10:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-19 15:10:38 -0500 |
| commit | ce364aeae795ca8a8e46e653b8024ac5a9ad0982 (patch) | |
| tree | 7af238dbdb370a768f965066dadadd144cbd70f7 | |
| parent | 8f0aa14fa695ff3aa3b3ed96c02fdb2ab99f272c (diff) | |
| parent | edddb9be0aa1f03c8608d3dabf7ccfea3fdde206 (diff) | |
Merge pull request #55 from razetime/master
Simple help pages for Primitive Symbols
126 files changed, 3483 insertions, 0 deletions
diff --git a/docs/help/abs_modulus.html b/docs/help/abs_modulus.html new file mode 100644 index 00000000..fe6449f0 --- /dev/null +++ b/docs/help/abs_modulus.html @@ -0,0 +1,25 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Pipe (`|`)</title> +</head> +<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="pipe-"><a class="header" href="#pipe-">Pipe (<code><span class='Function'>|</span></code>)</a></h1> +<h2 id="--absolute-value--"><a class="header" href="#--absolute-value--"><code><span class='Function'>|</span> <span class='Value'>π©</span></code>: Absolute Value</a></h2> +<p>Absolute Value of <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICB8IMKvMgoKICB8IDHigL8z4oC/wq804oC/Mw==">βοΈ</a><pre> <span class='Function'>|</span> <span class='Number'>Β―2</span> +2 + + <span class='Function'>|</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>Β―4</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 3 4 3 β© +</pre> +<h2 id="---modulus"><a class="header" href="#---modulus"><code><span class='Value'>π¨</span> <span class='Function'>|</span> <span class='Value'>π©</span></code>: Modulus</a></h2> +<p>Remainder of <code><span class='Value'>π©</span></code> divided by <code><span class='Value'>π¨</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIHwgMwoKICAyIHwgM+KAvzTigL81">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>|</span> <span class='Number'>3</span> +0 + + <span class='Number'>2</span> <span class='Function'>|</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ 1 0 1 β© +</pre> diff --git a/docs/help/after_bindright.html b/docs/help/after_bindright.html new file mode 100644 index 00000000..1e3266ef --- /dev/null +++ b/docs/help/after_bindright.html @@ -0,0 +1,40 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Left Multimap (`β`)</title> +</head> +<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="left-multimap-"><a class="header" href="#left-multimap-">Left Multimap (<code><span class='Modifier2'>β</span></code>)</a></h1> +<h2 id="--bind-"><a class="header" href="#--bind-"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Value'>π</span> <span class='Value'>π©</span></code>: Bind</a></h2> +<p>Supply <code><span class='Value'>π</span></code> as a right argument to <code><span class='Function'>π½</span></code> (<code><span class='Value'>π©</span> <span class='Function'>π½</span> <span class='Value'>π</span></code>).</p> +<h2 id="-must-be-a-value-f-must-be-dyadic"><a class="header" href="#-must-be-a-value-f-must-be-dyadic"><code><span class='Value'>π</span></code> must be a value, <code><span class='Function'>F</span></code> must be dyadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgLeKfnDMgOQoKICAgLSAzIDkKCiAgIDkgLSAz">βοΈ</a><pre> <span class='Function'>-</span><span class='Modifier2'>β</span><span class='Number'>3</span> <span class='Number'>9</span> +6 + + <span class='Function'>-</span> <span class='Number'>3</span> <span class='Number'>9</span> +<span class='Error'>Error: Double subjects (missing βΏ?)</span> + + <span class='Number'>9</span> <span class='Function'>-</span> <span class='Number'>3</span> +6 +</pre> +<h2 id="--after"><a class="header" href="#--after"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: After</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π©</span></code>, and supply it as a right argument to <code><span class='Function'>π½</span></code> (<code><span class='Value'>π©</span> <span class='Function'>π½</span> <span class='Paren'>(</span><span class='Function'>πΎ</span> <span class='Value'>π©</span><span class='Paren'>)</span></code>).</p> +<h2 id="-must-be-dyadic--must-be-monadic"><a class="header" href="#-must-be-dyadic--must-be-monadic"><code><span class='Function'>π½</span></code> must be dyadic, <code><span class='Function'>πΎ</span></code> must be monadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgw5fin5wtIDkKCiAgIMOXIC0gOQoKICAgOSDDlyAoLSA5KQ==">βοΈ</a><pre> <span class='Function'>Γ</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>9</span> +Β―81 + + <span class='Function'>Γ</span> <span class='Function'>-</span> <span class='Number'>9</span> +Β―1 + + <span class='Number'>9</span> <span class='Function'>Γ</span> <span class='Paren'>(</span><span class='Function'>-</span> <span class='Number'>9</span><span class='Paren'>)</span> +Β―81 +</pre> +<h2 id="---dyadic-after"><a class="header" href="#---dyadic-after"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Dyadic After</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π©</span></code>, and supply it as a right argument to <code><span class='Function'>π½</span></code> (<code><span class='Value'>π¨</span> <span class='Function'>π½</span> <span class='Paren'>(</span><span class='Function'>πΎ</span> <span class='Value'>π©</span><span class='Paren'>)</span></code>).</p> +<h2 id="-must-be-dyadic--must-be-monadic"><a class="header" href="#-must-be-dyadic--must-be-monadic"><code><span class='Function'>π½</span></code> must be dyadic, <code><span class='Function'>πΎ</span></code> must be monadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMiDDl+KfnC0gMQoKICAgMiDDlyAoLSAxKQ==">βοΈ</a><pre> <span class='Number'>2</span> <span class='Function'>Γ</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>1</span> +Β―2 + + <span class='Number'>2</span> <span class='Function'>Γ</span> <span class='Paren'>(</span><span class='Function'>-</span> <span class='Number'>1</span><span class='Paren'>)</span> +Β―2 +</pre> diff --git a/docs/help/assert_assertwithmsg.html b/docs/help/assert_assertwithmsg.html new file mode 100644 index 00000000..e172ecbd --- /dev/null +++ b/docs/help/assert_assertwithmsg.html @@ -0,0 +1,29 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Exclamation Mark (`!`)</title> +</head> +<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="exclamation-mark-"><a class="header" href="#exclamation-mark-">Exclamation Mark (<code><span class='Function'>!</span></code>)</a></h1> +<h2 id="--assert"><a class="header" href="#--assert"><code><span class='Function'>!</span> <span class='Value'>π©</span></code>: Assert</a></h2> +<p>Throw an error if <code><span class='Value'>π©</span></code> is not 1.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgISAxCgogICAhIDIKCiAgICEgImhlbGxvIg==">βοΈ</a><pre> <span class='Function'>!</span> <span class='Number'>1</span> +1 + + <span class='Function'>!</span> <span class='Number'>2</span> +<span class='Error'>Error: Assertion error</span> + + <span class='Function'>!</span> <span class='String'>"hello"</span> +<span class='Error'>Error: hello</span> +</pre> +<h2 id="---dyad"><a class="header" href="#---dyad"><code><span class='Value'>π¨</span> <span class='Function'>!</span> <span class='Value'>π©</span></code>: Dyad</a></h2> +<p>Throw an error with message <code><span class='Value'>π¨</span></code> if <code><span class='Value'>π©</span></code> is not 1.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgImhpIiAhIDEKCiAgICJ0d28iICEgMgoKICAgImhlbGxvIGVycm9yIiAhICJoZWxsbyI=">βοΈ</a><pre> <span class='String'>"hi"</span> <span class='Function'>!</span> <span class='Number'>1</span> +1 + + <span class='String'>"two"</span> <span class='Function'>!</span> <span class='Number'>2</span> +<span class='Error'>Error: two</span> + + <span class='String'>"hello error"</span> <span class='Function'>!</span> <span class='String'>"hello"</span> +<span class='Error'>Error: hello error</span> +</pre> diff --git a/docs/help/atop.html b/docs/help/atop.html new file mode 100644 index 00000000..2b01480b --- /dev/null +++ b/docs/help/atop.html @@ -0,0 +1,28 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Ring Operator (`β`)</title> +</head> +<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="ring-operator-"><a class="header" href="#ring-operator-">Ring Operator (<code><span class='Modifier2'>β</span></code>)</a></h1> +<h2 id="--atop"><a class="header" href="#--atop"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Atop</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π©</span></code>, then apply <code><span class='Function'>π½</span></code> (<code><span class='Function'>π½</span> <span class='Function'>πΎ</span> <span class='Value'>π©</span></code>).</p> +<h2 id="-and--must-be-monadic"><a class="header" href="#-and--must-be-monadic"><code><span class='Function'>π½</span></code> and <code><span class='Function'>πΎ</span></code> must be monadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgLeKImC0gNQoKICAgLSAtIDU=">βοΈ</a><pre> <span class='Function'>-</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>5</span> +5 + + <span class='Function'>-</span> <span class='Function'>-</span> <span class='Number'>5</span> +5 +</pre> +<h2 id="---dyadic-atop"><a class="header" href="#---dyadic-atop"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Dyadic Atop</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code>, then apply <code><span class='Function'>π½</span></code> (<code><span class='Function'>π½</span> <span class='Paren'>(</span><span class='Value'>π¨</span> <span class='Function'>πΎ</span> <span class='Value'>π©</span><span class='Paren'>)</span></code>).</p> +<h2 id="-must-be-monadic-and--must-be-dyadic"><a class="header" href="#-must-be-monadic-and--must-be-dyadic"><code><span class='Function'>π½</span></code> must be monadic, and <code><span class='Function'>πΎ</span></code> must be dyadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMSAt4oiYKyAyCgogICAxIC0gKyAyCgogICAtIDEgKyAy">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>-</span><span class='Modifier2'>β</span><span class='Function'>+</span> <span class='Number'>2</span> +Β―3 + + <span class='Number'>1</span> <span class='Function'>-</span> <span class='Function'>+</span> <span class='Number'>2</span> +Β―1 + + <span class='Function'>-</span> <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>2</span> +Β―3 +</pre> diff --git a/docs/help/before_bindleft.html b/docs/help/before_bindleft.html new file mode 100644 index 00000000..f084fe4c --- /dev/null +++ b/docs/help/before_bindleft.html @@ -0,0 +1,40 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Multimap (`βΈ`)</title> +</head> +<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="multimap-"><a class="header" href="#multimap-">Multimap (<code><span class='Modifier2'>βΈ</span></code>)</a></h1> +<h2 id="--bind-left"><a class="header" href="#--bind-left"><code><span class='Value'>π</span><span class='Modifier2'>βΈ</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Bind Left</a></h2> +<p>Supply <code><span class='Value'>π</span></code> as a left argument to <code><span class='Function'>πΎ</span></code> (<code><span class='Value'>π</span> <span class='Function'>πΎ</span> <span class='Value'>π©</span></code>).</p> +<h2 id="-must-be-a-value--must-be-dyadic"><a class="header" href="#-must-be-a-value--must-be-dyadic"><code><span class='Value'>π</span></code> must be a value, <code><span class='Function'>πΎ</span></code> must be dyadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgM+KKuC0gOQoKICAgMyAtIDk=">βοΈ</a><pre> <span class='Number'>3</span><span class='Modifier2'>βΈ</span><span class='Function'>-</span> <span class='Number'>9</span> +Β―6 + + <span class='Number'>3</span> <span class='Function'>-</span> <span class='Number'>9</span> +Β―6 +</pre> +<h2 id="--before"><a class="header" href="#--before"><code><span class='Function'>π½</span><span class='Modifier2'>βΈ</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Before</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to <code><span class='Value'>π©</span></code>, and supply it as a left argument to <code><span class='Function'>πΎ</span></code> (<code><span class='Paren'>(</span><span class='Function'>π½</span> <span class='Value'>π©</span><span class='Paren'>)</span> <span class='Function'>πΎ</span> <span class='Value'>π©</span></code>).</p> +<h2 id="-must-be-monadic--must-be-dyadic"><a class="header" href="#-must-be-monadic--must-be-dyadic"><code><span class='Function'>π½</span></code> must be monadic, <code><span class='Function'>πΎ</span></code> must be dyadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgLeKKuCsgOQoKICAgLSArIDkKCiAgICgtIDkpICsgOQ==">βοΈ</a><pre> <span class='Function'>-</span><span class='Modifier2'>βΈ</span><span class='Function'>+</span> <span class='Number'>9</span> +0 + + <span class='Function'>-</span> <span class='Function'>+</span> <span class='Number'>9</span> +Β―9 + + <span class='Paren'>(</span><span class='Function'>-</span> <span class='Number'>9</span><span class='Paren'>)</span> <span class='Function'>+</span> <span class='Number'>9</span> +0 +</pre> +<h2 id="---dyadic-before"><a class="header" href="#---dyadic-before"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>βΈ</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Dyadic Before</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to <code><span class='Value'>π¨</span></code>, and supply it as a left argument to <code><span class='Function'>πΎ</span></code> (<code><span class='Paren'>(</span><span class='Function'>π½</span> <span class='Value'>π¨</span><span class='Paren'>)</span> <span class='Function'>πΎ</span> <span class='Value'>π©</span></code>).</p> +<h2 id="-must-be-monadic--must-be-dyadic"><a class="header" href="#-must-be-monadic--must-be-dyadic"><code><span class='Function'>π½</span></code> must be monadic, <code><span class='Function'>πΎ</span></code> must be dyadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMiAt4oq4KyAxCgogICAyIC0gKyAxCgogICAoLSAyKSArIDE=">βοΈ</a><pre> <span class='Number'>2</span> <span class='Function'>-</span><span class='Modifier2'>βΈ</span><span class='Function'>+</span> <span class='Number'>1</span> +Β―1 + + <span class='Number'>2</span> <span class='Function'>-</span> <span class='Function'>+</span> <span class='Number'>1</span> +1 + + <span class='Paren'>(</span><span class='Function'>-</span> <span class='Number'>2</span><span class='Paren'>)</span> <span class='Function'>+</span> <span class='Number'>1</span> +Β―1 +</pre> diff --git a/docs/help/catch.html b/docs/help/catch.html new file mode 100644 index 00000000..2485a29b --- /dev/null +++ b/docs/help/catch.html @@ -0,0 +1,17 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circled Triangle Down (`β`)</title> +</head> +<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-triangle-down-"><a class="header" href="#circled-triangle-down-">Circled Triangle Down (<code><span class='Modifier2'>β</span></code>)</a></h1> +<h2 id="-----catch"><a class="header" href="#-----catch"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Catch</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to the arguments.</p> +<p>If an error happens when <code><span class='Function'>π½</span></code> is applied, cancel its execution, apply <code><span class='Function'>πΎ</span></code> to the arguments and return the results.</p> +<p>Otherwise, return the results of <code><span class='Function'>π½</span></code>.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oi+4o6KeyJlcnJvciBvY2N1cnJlZCB3aXRoIGFyZ3VtZW50OiAi4oi+4oCiRm10IPCdlal9IDEKCiAgIOKIvuKOinsiZXJyb3Igb2NjdXJyZWQgd2l0aCBhcmd1bWVudDogIuKIvuKAokZtdCDwnZWpfSDin6jin6gxLDLin6ksIOKfqDMsNOKfqeKfqQ==">βοΈ</a><pre> <span class='Function'>βΎ</span><span class='Modifier2'>β</span><span class='Brace'>{</span><span class='String'>"error occurred with argument: "</span><span class='Function'>βΎβ’Fmt</span> <span class='Value'>π©</span><span class='Brace'>}</span> <span class='Number'>1</span> +"error occurred with argument: 1" + + <span class='Function'>βΎ</span><span class='Modifier2'>β</span><span class='Brace'>{</span><span class='String'>"error occurred with argument: "</span><span class='Function'>βΎβ’Fmt</span> <span class='Value'>π©</span><span class='Brace'>}</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> +β¨ 1 2 3 4 β© +</pre> diff --git a/docs/help/ceiling_maximum.html b/docs/help/ceiling_maximum.html new file mode 100644 index 00000000..bc592eea --- /dev/null +++ b/docs/help/ceiling_maximum.html @@ -0,0 +1,22 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Left Ceiling (`β`)</title> +</head> +<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="left-ceiling-"><a class="header" href="#left-ceiling-">Left Ceiling (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--ceiling--"><a class="header" href="#--ceiling--"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Ceiling</a></h2> +<p>Round <code><span class='Value'>π©</span></code> up.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDijIggMS4y4oC/z4DigL8z4oC/Ny44OQ==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>1.2</span><span class='Ligature'>βΏ</span><span class='Number'>Ο</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>7.89</span> +β¨ 2 4 3 8 β© +</pre> +<h2 id="---maximum"><a class="header" href="#---maximum"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Maximum</a></h2> +<p>Maximum of <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIOKMiCAyCgogIDLigL8zIOKMiCA04oC/Mg==">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β</span> <span class='Number'>2</span> +2 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> +β¨ 4 3 β© +</pre> diff --git a/docs/help/cells.html b/docs/help/cells.html new file mode 100644 index 00000000..a914e696 --- /dev/null +++ b/docs/help/cells.html @@ -0,0 +1,27 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Breve (`Λ`)</title> +</head> +<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="breve-"><a class="header" href="#breve-">Breve (<code><span class='Modifier'>Λ</span></code>)</a></h1> +<h2 id="-----cells"><a class="header" href="#-----cells"><code><span class='Function'>π½</span><span class='Modifier'>Λ</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>Λ</span> <span class='Value'>π©</span></code>: Cells</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to/between the major cells of the arguments. (<code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Number'>Β―1</span></code>)</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCgogICA8y5ggYQoKICAgYSDiiY3LmCBh">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + + <span class='Function'><</span><span class='Modifier'>Λ</span> <span class='Value'>a</span> +β¨ β¨ 0 1 2 β© β¨ 3 4 5 β© β¨ 6 7 8 β© β© + + <span class='Value'>a</span> <span class='Function'>β</span><span class='Modifier'>Λ</span> <span class='Value'>a</span> +ββ +β 0 1 2 + 0 1 2 + + 3 4 5 + 3 4 5 + + 6 7 8 + 6 7 8 + β +</pre> diff --git a/docs/help/choose.html b/docs/help/choose.html new file mode 100644 index 00000000..9598863b --- /dev/null +++ b/docs/help/choose.html @@ -0,0 +1,23 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle with Lower Right Quadrant (`βΆ`)</title> +</head> +<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="circle-with-lower-right-quadrant-"><a class="header" href="#circle-with-lower-right-quadrant-">Circle with Lower Right Quadrant (<code><span class='Modifier2'>βΆ</span></code>)</a></h1> +<h2 id="-----choose"><a class="header" href="#-----choose"><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>: Choose</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to the arguments and pick a function from list <code><span class='Value'>π</span></code>. Apply the picked function to the arguments.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgRiDihpAg4oqi4pe2K+KAvy3igL/Dt+KAv8OXCgogICBGIDAKCiAgIEYgMQoKICAgRiAyCgogICBGIDM=">βοΈ</a><pre> <span class='Function'>F</span> <span class='Gets'>β</span> <span class='Function'>β’</span><span class='Modifier2'>βΆ</span><span class='Function'>+</span><span class='Ligature'>βΏ</span><span class='Function'>-</span><span class='Ligature'>βΏ</span><span class='Function'>Γ·</span><span class='Ligature'>βΏ</span><span class='Function'>Γ</span> + + <span class='Function'>F</span> <span class='Number'>0</span> +0 + + <span class='Function'>F</span> <span class='Number'>1</span> +Β―1 + + <span class='Function'>F</span> <span class='Number'>2</span> +0.5 + + <span class='Function'>F</span> <span class='Number'>3</span> +1 +</pre> diff --git a/docs/help/classify_indexof.html b/docs/help/classify_indexof.html new file mode 100644 index 00000000..439380a8 --- /dev/null +++ b/docs/help/classify_indexof.html @@ -0,0 +1,31 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Square Original Of (`β`)</title> +</head> +<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="square-original-of-"><a class="header" href="#square-original-of-">Square Original Of (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--classify--"><a class="header" href="#--classify--"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Classify</a></h2> +<p>First index of each major cell of <code><span class='Value'>π©</span></code> 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=ICAg4oqQIDXigL824oC/MuKAvzLigL814oC/MQoKICAgYSDihpAgM+KAvzMg4qWKIDDigL8x4oC/MuKAvznigL8w4oC/OeKAvzDigL8x4oC/MgoKICAg4oqQIGE=">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> +β¨ 0 1 2 2 0 3 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>9</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>9</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +β¨ 0 1 0 β© +</pre> +<h2 id="---index-of"><a class="header" href="#---index-of"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Index Of</a></h2> +<p>First index of each major cell of <code><span class='Value'>π©</span></code> in <code><span class='Value'>π¨</span></code>. Rank of <code><span class='Value'>π©</span></code> must be at least cell rank of π¨`.</p> +<p>If a cell is not found in <code><span class='Value'>π¨</span></code>, that position will contain the length of <code><span class='Value'>π¨</span></code> (<code><span class='Function'>β </span><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=ICAgNeKAvzbigL8y4oC/MuKAvzXigL8xIOKKkCA14oC/MuKAvzHigL82CgogICBhIOKGkCAz4oC/MyDipYogMOKAvzHigL8y4oC/OeKAvzDigL854oC/MOKAvzHigL8yCgogICBhIOKKkCDin6g54oC/MOKAvznin6k=">βοΈ</a><pre> <span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> <span class='Function'>β</span> <span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>6</span> +β¨ 0 2 5 1 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>9</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>9</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Value'>a</span> <span class='Function'>β</span> <span class='Bracket'>β¨</span><span class='Number'>9</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>9</span><span class='Bracket'>β©</span> +βΒ· +Β· 3 + β +</pre> diff --git a/docs/help/conjugate_add.html b/docs/help/conjugate_add.html new file mode 100644 index 00000000..9f42ea1e --- /dev/null +++ b/docs/help/conjugate_add.html @@ -0,0 +1,26 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Plus (`+`)</title> +</head> +<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="plus-"><a class="header" href="#plus-">Plus (<code><span class='Function'>+</span></code>)</a></h1> +<h2 id="--conjugate"><a class="header" href="#--conjugate"><code><span class='Function'>+</span> <span class='Value'>π©</span></code>: Conjugate</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICArIDEKCiAgKyDCrzE=">βοΈ</a><pre> <span class='Function'>+</span> <span class='Number'>1</span> +1 + + <span class='Function'>+</span> <span class='Number'>Β―1</span> +Β―1 +</pre> +<h2 id="---add"><a class="header" href="#---add"><code><span class='Value'>π¨</span> <span class='Function'>+</span> <span class='Value'>π©</span></code>: Add</a></h2> +<h2 id="-added-to--either--or--can-be-a-character-and-if-so-the-other-has-to-be-an-integer"><a class="header" href="#-added-to--either--or--can-be-a-character-and-if-so-the-other-has-to-be-an-integer"><code><span class='Value'>π¨</span></code> added to <code><span class='Value'>π©</span></code>. Either <code><span class='Value'>π¨</span></code> or <code><span class='Value'>π©</span></code> can be a character, and if so, the other has to be an integer.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxICsgMgoKICAxICsgMuKAvzPigL80CgogICdhJyArIDQ=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>2</span> +3 + + <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ 3 4 5 β© + + <span class='String'>'a'</span> <span class='Function'>+</span> <span class='Number'>4</span> +'e' +</pre> diff --git a/docs/help/constant.html b/docs/help/constant.html new file mode 100644 index 00000000..10312562 --- /dev/null +++ b/docs/help/constant.html @@ -0,0 +1,15 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Dot Above (`Λ`)</title> +</head> +<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="dot-above-"><a class="header" href="#dot-above-">Dot Above (<code><span class='Modifier'>Λ</span></code>)</a></h1> +<h2 id="-----constant"><a class="header" href="#-----constant"><code><span class='Function'>π½</span><span class='Modifier'>Λ</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>Λ</span> <span class='Value'>π©</span></code>: Constant</a></h2> +<p>Returns a function that will always return <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=ICAgImhlbGxvIiAoMSDLmSkgMgoKICAgImhlbGxvIiAoe/Cdlagr8J2VqX0gy5kpIDI=">βοΈ</a><pre> <span class='String'>"hello"</span> <span class='Paren'>(</span><span class='Number'>1</span> <span class='Modifier'>Λ</span><span class='Paren'>)</span> <span class='Number'>2</span> +1 + + <span class='String'>"hello"</span> <span class='Paren'>(</span><span class='Brace'>{</span><span class='Value'>π¨</span><span class='Function'>+</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Modifier'>Λ</span><span class='Paren'>)</span> <span class='Number'>2</span> +(function block) +</pre> diff --git a/docs/help/deduplicate_find.html b/docs/help/deduplicate_find.html new file mode 100644 index 00000000..8a57c765 --- /dev/null +++ b/docs/help/deduplicate_find.html @@ -0,0 +1,40 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Epsilon Underbar (`β·`)</title> +</head> +<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="epsilon-underbar-"><a class="header" href="#epsilon-underbar-">Epsilon Underbar (<code><span class='Function'>β·</span></code>)</a></h1> +<h2 id="--deduplicate"><a class="header" href="#--deduplicate"><code><span class='Function'>β·</span> <span class='Value'>π©</span></code>: Deduplicate</a></h2> +<p>Unique major cells of <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=ICAg4o23IDTigL814oC/NuKAvzbigL804oC/N+KAvzUKCiAgIGEg4oaQIDPigL8zIOKliiDihpU2CgogICDijbcgYQ==">βοΈ</a><pre> <span class='Function'>β·</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ 4 5 6 7 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>6</span> + + <span class='Function'>β·</span> <span class='Value'>a</span> +ββ +β΅ 0 1 2 + 3 4 5 + β +</pre> +<h2 id="---find"><a class="header" href="#---find"><code><span class='Value'>π¨</span> <span class='Function'>β·</span> <span class='Value'>π©</span></code>: Find</a></h2> +<p>Mark the top left location of the occurrences of <code><span class='Value'>π¨</span></code> in <code><span class='Value'>π©</span></code> with a 1, and other locations with 0.</p> +<p>Result is the same shape as <code><span class='Paren'>(</span><span class='Function'>β’</span><span class='Value'>π¨</span><span class='Paren'>)</span><span class='Function'>β</span><span class='Value'>x</span></code>.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgInN0cmluZyIg4o23ICJzdWJzdHJpbmciCgogICAibG9vb29vb25nIiDijbcgInNob3J0IgoKICAgYSDihpAgNyAoNHzii4bLnCnijJzil4vihpUgOQoKICAgYiDihpAgKDDigL8z4oC/MOKJjTDigL8x4oC/MCkKCiAgIGIg4o23IGE=">βοΈ</a><pre> <span class='String'>"string"</span> <span class='Function'>β·</span> <span class='String'>"substring"</span> +β¨ 0 0 0 1 β© + + <span class='String'>"loooooong"</span> <span class='Function'>β·</span> <span class='String'>"short"</span> +β¨β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>7</span> <span class='Paren'>(</span><span class='Number'>4</span><span class='Function'>|β</span><span class='Modifier'>Λ</span><span class='Paren'>)</span><span class='Modifier'>β</span><span class='Modifier2'>β</span><span class='Function'>β</span> <span class='Number'>9</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Value'>b</span> <span class='Gets'>β</span> <span class='Paren'>(</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Function'>β</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Paren'>)</span> + + <span class='Value'>b</span> <span class='Function'>β·</span> <span class='Value'>a</span> +ββ +β΅ 0 + 0 + β +</pre> diff --git a/docs/help/depth.html b/docs/help/depth.html new file mode 100644 index 00000000..be9d22d5 --- /dev/null +++ b/docs/help/depth.html @@ -0,0 +1,15 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle With Two Dots (`β`)</title> +</head> +<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="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>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=ICAgMeKKuOKGk+KahzEg4p+o4p+oMSwyLDPin6ksIOKfqDQsNSw24p+p4p+pCgogICAxIOKGk+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> +β¨ β¨ 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 β© β© +</pre> diff --git a/docs/help/depth_match.html b/docs/help/depth_match.html new file mode 100644 index 00000000..ab4ddf5b --- /dev/null +++ b/docs/help/depth_match.html @@ -0,0 +1,26 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Identical To (`β‘`)</title> +</head> +<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="identical-to-"><a class="header" href="#identical-to-">Identical To (<code><span class='Function'>β‘</span></code>)</a></h1> +<h2 id="--depth"><a class="header" href="#--depth"><code><span class='Function'>β‘</span> <span class='Value'>π©</span></code>: Depth</a></h2> +<p>Highest level of nesting 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=ICDiiaEgMuKAvzPigL80CgogIOKJoSDin6gyLDwzLDQsPDw8NeKfqQoKICDiiaEgOQ==">βοΈ</a><pre> <span class='Function'>β‘</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +1 + + <span class='Function'>β‘</span> <span class='Bracket'>β¨</span><span class='Number'>2</span><span class='Separator'>,</span><span class='Function'><</span><span class='Number'>3</span><span class='Separator'>,</span><span class='Number'>4</span><span class='Separator'>,</span><span class='Function'><<<</span><span class='Number'>5</span><span class='Bracket'>β©</span> +4 + + <span class='Function'>β‘</span> <span class='Number'>9</span> +0 +</pre> +<h2 id="---match"><a class="header" href="#---match"><code><span class='Value'>π¨</span> <span class='Function'>β‘</span> <span class='Value'>π©</span></code>: Match</a></h2> +<p>Does <code><span class='Value'>π¨</span></code> exactly match <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=ICAxIOKJoSDin6gx4p+pCgogIOKfqDHin6kg4omhIOKfqDHin6k=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β‘</span> <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> +0 + + <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> <span class='Function'>β‘</span> <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> +1 +</pre> diff --git a/docs/help/deshape_reshape.html b/docs/help/deshape_reshape.html new file mode 100644 index 00000000..fa7992a9 --- /dev/null +++ b/docs/help/deshape_reshape.html @@ -0,0 +1,45 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Barb (`β₯`)</title> +</head> +<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="barb-"><a class="header" href="#barb-">Barb (<code><span class='Function'>β₯</span></code>)</a></h1> +<h2 id="--deshape--"><a class="header" href="#--deshape--"><code><span class='Function'>β₯</span> <span class='Value'>π©</span></code>: Deshape</a></h2> +<p>Put all elements of <code><span class='Value'>π©</span></code> in a rank 1 array, converting to array if necessary.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgICAg4qWKIDEKCiAgICAgIOKliiAx4oC/MiDiiY0gM+KAvzQ=">βοΈ</a><pre> <span class='Function'>β₯</span> <span class='Number'>1</span> +β¨ 1 β© + + <span class='Function'>β₯</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ 1 2 3 4 β© +</pre> +<h2 id="---reshape"><a class="header" href="#---reshape"><code><span class='Value'>π¨</span> <span class='Function'>β₯</span> <span class='Value'>π©</span></code>: Reshape</a></h2> +<p>Put all elements of <code><span class='Value'>π©</span></code> in an array of shape <code><span class='Value'>π¨</span></code>, adding or removing elements if necessary.</p> +<p>A single element in <code><span class='Value'>π©</span></code> can be a function, which will be replaced with an appropriate length:</p> +<ul> +<li><code><span class='Modifier2'>β</span></code> Exact fit</li> +<li><code><span class='Function'>β</span></code> Round length down, discarding elements</li> +<li><code><span class='Function'>β½</span></code> Round length up</li> +<li><code><span class='Function'>β</span></code> Round length up, and use element fill to add extra elements.</li> +</ul> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgICAgM+KAvzMg4qWKIDMKCiAgICAgIDLigL/ijL3igL8yIOKliiAx4oC/MuKAvzMKCiAgICAgIDLigL/ihpHigL8yIOKliiAx4oC/MuKAvzM=">βοΈ</a><pre> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>3</span> +ββ +β΅ 3 3 3 + 3 3 3 + 3 3 3 + β + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Function'>β½</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>β₯</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +ββ +β 1 2 + + 3 1 + β + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Function'>β</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>β₯</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +ββ +β 1 2 + + 3 0 + β +</pre> diff --git a/docs/help/each.html b/docs/help/each.html new file mode 100644 index 00000000..0b4b2e53 --- /dev/null +++ b/docs/help/each.html @@ -0,0 +1,19 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Diaresis (`Β¨`)</title> +</head> +<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="diaresis-"><a class="header" href="#diaresis-">Diaresis (<code><span class='Modifier'>Β¨</span></code>)</a></h1> +<h2 id="-----each"><a class="header" href="#-----each"><code><span class='Function'>π½</span><span class='Modifier'>Β¨</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>Β¨</span> <span class='Value'>π©</span></code>: Each</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to/between the major elements of the arguments. (<code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Number'>Β―1</span></code>)</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgPMKoIDHigL8y4oC/MwoKICAgNOKAvzXigL82IOKIvsKoIDHigL8y4oC/Mw==">βοΈ</a><pre> <span class='Function'><</span><span class='Modifier'>Β¨</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +ββ +Β· βΒ· βΒ· βΒ· + Β· 1 Β· 2 Β· 3 + β β β + β + + <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span> <span class='Function'>βΎ</span><span class='Modifier'>Β¨</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ β¨ 4 1 β© β¨ 5 2 β© β¨ 6 3 β© β© +</pre> diff --git a/docs/help/enclose_less.html b/docs/help/enclose_less.html new file mode 100644 index 00000000..634b255e --- /dev/null +++ b/docs/help/enclose_less.html @@ -0,0 +1,28 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Lesser Than (`<`)</title> +</head> +<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="lesser-than-"><a class="header" href="#lesser-than-">Lesser Than (<code><span class='Function'><</span></code>)</a></h1> +<h2 id="--enclose--"><a class="header" href="#--enclose--"><code><span class='Function'><</span> <span class='Value'>π©</span></code>: Enclose</a></h2> +<p>Create a unit array containing <code><span class='Value'>π©</span></code>. (<code><span class='Paren'>(</span><span class='Function'>β’</span><span class='Value'>π©</span><span class='Paren'>)</span> <span class='Function'>β‘</span> <span class='Bracket'>β¨β©</span></code>)</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICA8MQoKCiAg4omiPDE=">βοΈ</a><pre> <span class='Function'><</span><span class='Number'>1</span> +βΒ· +Β· 1 + β + + +<span class='Error'>Error: Empty program</span> + <span class='Function'>β’<</span><span class='Number'>1</span> +β¨β© +</pre> +<h2 id="---lesser-than"><a class="header" href="#---lesser-than"><code><span class='Value'>π¨</span> <span class='Function'><</span> <span class='Value'>π©</span></code>: Lesser Than</a></h2> +<h2 id="-and--can-both-be-either-numbers-or-characters"><a class="header" href="#-and--can-both-be-either-numbers-or-characters"><code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> can both be either numbers or characters.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIDwgMwoKICAy4oC/M+KAvzAgPCAz4oC/MeKAvzA=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'><</span> <span class='Number'>3</span> +1 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'><</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 1 0 0 β© +</pre> diff --git a/docs/help/enlist_pair.html b/docs/help/enlist_pair.html new file mode 100644 index 00000000..b28f9c8c --- /dev/null +++ b/docs/help/enlist_pair.html @@ -0,0 +1,39 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Bow Tie (`β`)</title> +</head> +<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="bow-tie-"><a class="header" href="#bow-tie-">Bow Tie (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--enlist-"><a class="header" href="#--enlist-"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Enlist</a></h2> +<p>Put <code><span class='Value'>π©</span></code> in a single element list. (<code><span class='Bracket'>β¨</span><span class='Value'>π©</span><span class='Bracket'>β©</span></code>)</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICDii4ggMQoKICDii4ggNOKAvzQg4qWKIDPigL82N+KAvzjigL8w">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>1</span> +β¨ 1 β© + + <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>β₯</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>67</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +ββ +Β· ββ + β΅ 3 67 8 0 + 3 67 8 0 + 3 67 8 0 + 3 67 8 0 + β + β +</pre> +<h2 id="---pair"><a class="header" href="#---pair"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Pair</a></h2> +<p>Put <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> in a two element list. (<code><span class='Bracket'>β¨</span><span class='Value'>π¨</span><span class='Separator'>,</span> <span class='Value'>π©</span><span class='Bracket'>β©</span></code>)</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAxIOKLiCAyCgogIDEg4ouIICJkc2Rhc2RhcyIKCiAgKDPigL8zIOKliiAzKSDii4ggNjfigL8nYSfigL8iZXhhbXBsZSI=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β</span> <span class='Number'>2</span> +β¨ 1 2 β© + + <span class='Number'>1</span> <span class='Function'>β</span> <span class='String'>"dsdasdas"</span> +β¨ 1 "dsdasdas" β© + + <span class='Paren'>(</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>3</span><span class='Paren'>)</span> <span class='Function'>β</span> <span class='Number'>67</span><span class='Ligature'>βΏ</span><span class='String'>'a'</span><span class='Ligature'>βΏ</span><span class='String'>"example"</span> +ββ +Β· ββ β¨ 67 'a' "example" β© + β΅ 3 3 3 + 3 3 3 + 3 3 3 + β + β +</pre> diff --git a/docs/help/exponential_power.html b/docs/help/exponential_power.html new file mode 100644 index 00000000..6156110d --- /dev/null +++ b/docs/help/exponential_power.html @@ -0,0 +1,25 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Star (`β`)</title> +</head> +<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="star-"><a class="header" href="#star-">Star (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--exponential--"><a class="header" href="#--exponential--"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Exponential</a></h2> +<h2 id="e-eulers-constant-to-the-power-of-"><a class="header" href="#e-eulers-constant-to-the-power-of-"><code><span class='Value'>e</span></code> (Euler's constant) to the power of <code><span class='Value'>π©</span></code>.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDii4YgMOKAvzHigL8y4oC/Mw==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 2.718281828459045 7.38905609893065 20.08553692318767 β© +</pre> +<h2 id="---power"><a class="header" href="#---power"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Power</a></h2> +<h2 id="-to-the-power-of-"><a class="header" href="#-to-the-power-of-"><code><span class='Value'>π¨</span></code> to the power of <code><span class='Value'>π©</span></code>.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAyIOKLhiA1CgogIDjigL814oC/OSDii4YgMgoKICAy4oC/MyDii4YgM+KAv8KvNA==">βοΈ</a><pre> <span class='Number'>2</span> <span class='Function'>β</span> <span class='Number'>5</span> +32 + + <span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>9</span> <span class='Function'>β</span> <span class='Number'>2</span> +β¨ 64 25 81 β© + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>Β―4</span> +β¨ 8 0.01234567901234568 β© +</pre> diff --git a/docs/help/first_pick.html b/docs/help/first_pick.html new file mode 100644 index 00000000..6c829cbf --- /dev/null +++ b/docs/help/first_pick.html @@ -0,0 +1,28 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Square Image Of Or Equal To (`β`)</title> +</head> +<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="square-image-of-or-equal-to-"><a class="header" href="#square-image-of-or-equal-to-">Square Image Of Or Equal To (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--first"><a class="header" href="#--first"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: First</a></h2> +<p>First element of <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=ICAg4oqRIOKfqDEsIDIsIDPin6kKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICDiipEgYQ==">βοΈ</a><pre> <span class='Function'>β</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> +1 + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +0 +</pre> +<h2 id="---pick"><a class="header" href="#---pick"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Pick</a></h2> +<p>Pick the element of <code><span class='Value'>π¨</span></code> at index <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=ICAgMiDiipEg4p+oMSwgMiwgM+KfqQoKICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCiAgIDLigL8wIOKKkSBh">βοΈ</a><pre> <span class='Number'>2</span> <span class='Function'>β</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> +3 + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β</span> <span class='Value'>a</span> +6 +</pre> diff --git a/docs/help/firstcell_select.html b/docs/help/firstcell_select.html new file mode 100644 index 00000000..63369774 --- /dev/null +++ b/docs/help/firstcell_select.html @@ -0,0 +1,33 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Square Image Of (`β`)</title> +</head> +<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="square-image-of-"><a class="header" href="#square-image-of-">Square Image Of (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--first-cell"><a class="header" href="#--first-cell"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: First Cell</a></h2> +<p>First major cell of <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=ICAg4oqPIOKfqDEsIDIsIDPin6kKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICDiio8gYQ==">βοΈ</a><pre> <span class='Function'>β</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> +βΒ· +Β· 1 + β + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +β¨ 0 1 2 β© +</pre> +<h2 id="---select"><a class="header" href="#---select"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Select</a></h2> +<p>Select the major cells of <code><span class='Value'>π¨</span></code> at the indices 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=ICAgMuKAvzAg4oqPIOKfqDEsIDIsIDPin6kKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICAy4oC/MCDiio8gYQ==">βοΈ</a><pre> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β</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> +β¨ 3 1 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +β΅ 6 7 8 + 0 1 2 + β +</pre> diff --git a/docs/help/floor_minimum.html b/docs/help/floor_minimum.html new file mode 100644 index 00000000..75aa49a4 --- /dev/null +++ b/docs/help/floor_minimum.html @@ -0,0 +1,22 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Left Floor (`β`)</title> +</head> +<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="left-floor-"><a class="header" href="#left-floor-">Left Floor (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--floor--"><a class="header" href="#--floor--"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Floor</a></h2> +<p>Round <code><span class='Value'>π©</span></code> down.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDijIogMS4y4oC/z4DigL8z4oC/Ny44OQ==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>1.2</span><span class='Ligature'>βΏ</span><span class='Number'>Ο</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>7.89</span> +β¨ 1 3 3 7 β© +</pre> +<h2 id="---minimum"><a class="header" href="#---minimum"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Minimum</a></h2> +<p>Minimum of <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIOKMiiAyCgogIDLigL8zIOKMiiA04oC/Mg==">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β</span> <span class='Number'>2</span> +1 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> +β¨ 2 2 β© +</pre> diff --git a/docs/help/fold.html b/docs/help/fold.html new file mode 100644 index 00000000..019d92eb --- /dev/null +++ b/docs/help/fold.html @@ -0,0 +1,35 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Acute Accent (`Β΄`)</title> +</head> +<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="acute-accent-"><a class="header" href="#acute-accent-">Acute Accent (<code><span class='Modifier'>Β΄</span></code>)</a></h1> +<h2 id="--fold"><a class="header" href="#--fold"><code><span class='Function'>π½</span><span class='Modifier'>Β΄</span> <span class='Value'>π©</span></code>: Fold</a></h2> +<p>Fold over <code><span class='Value'>π©</span></code> with <code><span class='Function'>π½</span></code> from right to left i.e. Insert <code><span class='Function'>π½</span></code> between the elements of <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=ICAgK8K0IDHigL8y4oC/MwoKICAgMSsyKzMKCiAgIC3CtCAx4oC/MuKAvzMKCiAgIDEtMi0z">βοΈ</a><pre> <span class='Function'>+</span><span class='Modifier'>Β΄</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +6 + + <span class='Number'>1</span><span class='Function'>+</span><span class='Number'>2</span><span class='Function'>+</span><span class='Number'>3</span> +6 + + <span class='Function'>-</span><span class='Modifier'>Β΄</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +2 + + <span class='Number'>1</span><span class='Function'>-</span><span class='Number'>2</span><span class='Function'>-</span><span class='Number'>3</span> +2 +</pre> +<h2 id="---fold-with-initial"><a class="header" href="#---fold-with-initial"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>Β΄</span> <span class='Value'>π©</span></code>: Fold With initial</a></h2> +<p>Monadic fold, but use <code><span class='Value'>π¨</span></code> as initial right argument.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgNSArwrQgMeKAvzLigL8zCgogICAxKzIrMys1CgogICA1IC3CtCAx4oC/MuKAvzMKCiAgIDEtMi0zLTU=">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>+</span><span class='Modifier'>Β΄</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +11 + + <span class='Number'>1</span><span class='Function'>+</span><span class='Number'>2</span><span class='Function'>+</span><span class='Number'>3</span><span class='Function'>+</span><span class='Number'>5</span> +11 + + <span class='Number'>5</span> <span class='Function'>-</span><span class='Modifier'>Β΄</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +Β―3 + + <span class='Number'>1</span><span class='Function'>-</span><span class='Number'>2</span><span class='Function'>-</span><span class='Number'>3</span><span class='Function'>-</span><span class='Number'>5</span> +Β―3 +</pre> diff --git a/docs/help/gradedown_binsdown.html b/docs/help/gradedown_binsdown.html new file mode 100644 index 00000000..4aa25059 --- /dev/null +++ b/docs/help/gradedown_binsdown.html @@ -0,0 +1,29 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Del Stile (`β`)</title> +</head> +<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="del-stile-"><a class="header" href="#del-stile-">Del Stile (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--grade-down"><a class="header" href="#--grade-down"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Grade Down</a></h2> +<p>Indices of <code><span class='Value'>π©</span></code> that would sort its major cells in descending order.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgYSDihpAgMeKAvzLigL8zCgogICDijZIgYQoKICAgKOKNkmEpIOKKjyBh">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +β¨ 2 1 0 β© + + <span class='Paren'>(</span><span class='Function'>β</span><span class='Value'>a</span><span class='Paren'>)</span> <span class='Function'>β</span> <span class='Value'>a</span> +β¨ 3 2 1 β© +</pre> +<h2 id="---bins-down"><a class="header" href="#---bins-down"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Bins Down</a></h2> +<p>Binary search for each element of <code><span class='Value'>π©</span></code> in <code><span class='Value'>π¨</span></code>, and return the index found, if any.</p> +<h2 id="-must-be-sorted-in-descending-order"><a class="header" href="#-must-be-sorted-in-descending-order"><code><span class='Value'>π¨</span></code> must be sorted in descending order.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion">Right Pervasive.</a></p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgN+KAvzXigL804oC/MyDijZIgMgoKICAgN+KAvzXigL804oC/MyDijZIgMuKAvzY=">βοΈ</a><pre> <span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>2</span> +βΒ· +Β· 4 + β + + <span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>6</span> +β¨ 4 1 β© +</pre> diff --git a/docs/help/gradeup_binsup.html b/docs/help/gradeup_binsup.html new file mode 100644 index 00000000..ef5ac4ba --- /dev/null +++ b/docs/help/gradeup_binsup.html @@ -0,0 +1,28 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Delta Stile (`β`)</title> +</head> +<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="delta-stile-"><a class="header" href="#delta-stile-">Delta Stile (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--grade-up"><a class="header" href="#--grade-up"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Grade Up</a></h2> +<p>Indices of <code><span class='Value'>π©</span></code> that would sort its major cells in ascending order.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgYSDihpAgM+KAvzLigL8xCgogICDijYsgYQoKICAgKOKNi2EpIOKKjyBh">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</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='Value'>a</span> +β¨ 2 1 0 β© + + <span class='Paren'>(</span><span class='Function'>β</span><span class='Value'>a</span><span class='Paren'>)</span> <span class='Function'>β</span> <span class='Value'>a</span> +β¨ 1 2 3 β© +</pre> +<h2 id="---bins-up"><a class="header" href="#---bins-up"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Bins Up</a></h2> +<p>Binary search for each element of <code><span class='Value'>π©</span></code> in <code><span class='Value'>π¨</span></code>, and return the index found, if any.</p> +<h2 id="-must-be-sorted-in-ascending-order"><a class="header" href="#-must-be-sorted-in-ascending-order"><code><span class='Value'>π¨</span></code> must be sorted in ascending order.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgM+KAvzTigL814oC/NyDijYsgMgoKICAgM+KAvzTigL814oC/NyDijYsgMuKAvzY=">βοΈ</a><pre> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>7</span> <span class='Function'>β</span> <span class='Number'>2</span> +βΒ· +Β· 0 + β + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>7</span> <span class='Function'>β</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>6</span> +β¨ 0 3 β© +</pre> diff --git a/docs/help/greatequal.html b/docs/help/greatequal.html new file mode 100644 index 00000000..0ef22e70 --- /dev/null +++ b/docs/help/greatequal.html @@ -0,0 +1,16 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Greater Than or Equal To (`β₯`)</title> +</head> +<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="greater-than-or-equal-to-"><a class="header" href="#greater-than-or-equal-to-">Greater Than or Equal To (<code><span class='Function'>β₯</span></code>)</a></h1> +<h2 id="---greater-than-or-equal-to"><a class="header" href="#---greater-than-or-equal-to"><code><span class='Value'>π¨</span> <span class='Function'>β₯</span> <span class='Value'>π©</span></code>: Greater Than or Equal To</a></h2> +<h2 id="-and--can-both-be-either-numbers-or-characters"><a class="header" href="#-and--can-both-be-either-numbers-or-characters"><code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> can both be either numbers or characters.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIOKJpSAzCgogIDLigL8z4oC/MCDiiaUgM+KAvzHigL8w">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β₯</span> <span class='Number'>3</span> +0 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β₯</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 0 1 1 β© +</pre> diff --git a/docs/help/groupindices_group.html b/docs/help/groupindices_group.html new file mode 100644 index 00000000..2c0bc452 --- /dev/null +++ b/docs/help/groupindices_group.html @@ -0,0 +1,32 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Square Cup (`β`)</title> +</head> +<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="square-cup-"><a class="header" href="#square-cup-">Square Cup (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--group-indices"><a class="header" href="#--group-indices"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Group Indices</a></h2> +<p>Group the indices of the major cells of <code><span class='Value'>π©</span></code> by their respective values.</p> +<h2 id="-must-consist-of-integers-groups-start-from-0-"><a class="header" href="#-must-consist-of-integers-groups-start-from-0-"><code><span class='Value'>π©</span></code> must consist of integers. Groups start from 0.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oqUIDTigL814oC/NuKAvzbigL804oC/N+KAvzUKCiAgICjihpU4KSDiiY0g4oqUIDTigL814oC/NuKAvzbigL804oC/N+KAvzU=">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ β¨β© β¨β© β¨β© β¨β© β¨ 0 4 β© β¨ 1 6 β© β¨ 2 3 β© β¨ 5 β© β© + + <span class='Paren'>(</span><span class='Function'>β</span><span class='Number'>8</span><span class='Paren'>)</span> <span class='Function'>β</span> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +ββ +β΅ 0 1 2 3 4 5 6 7 + β¨β© β¨β© β¨β© β¨β© β¨ 0 4 β© β¨ 1 6 β© β¨ 2 3 β© β¨ 5 β© + β +</pre> +<h2 id="---group"><a class="header" href="#---group"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Group</a></h2> +<p>Group the major cells of <code><span class='Value'>π©</span></code> by their respective indices in <code><span class='Value'>π¨</span></code>.</p> +<p>If an element corresponds to <code><span class='Number'>Β―1</span></code>, it is excluded from grouping.</p> +<p>An extra element can be added to the end of <code><span class='Value'>π¨</span></code> to specify length of the result.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMeKAvzDigL8x4oC/MuKAvzLigL8z4oC/MyAg4oqUIDTigL814oC/NuKAvzbigL804oC/N+KAvzUKCiAgIDHigL8w4oC/MeKAv8KvMeKAv8KvMeKAvzPigL8zICDiipQgNOKAvzXigL824oC/NuKAvzTigL834oC/NQoKICAgMeKAvzDigL8x4oC/wq8x4oC/wq8x4oC/M+KAvzPigL8xMCAg4oqUIDTigL814oC/NuKAvzbigL804oC/N+KAvzU=">βοΈ</a><pre> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ β¨ 5 β© β¨ 4 6 β© β¨ 6 4 β© β¨ 7 5 β© β© + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>Β―1</span><span class='Ligature'>βΏ</span><span class='Number'>Β―1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ β¨ 5 β© β¨ 4 6 β© β¨β© β¨ 7 5 β© β© + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>Β―1</span><span class='Ligature'>βΏ</span><span class='Number'>Β―1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>10</span> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ β¨ 5 β© β¨ 4 6 β© β¨β© β¨ 7 5 β© β¨β© β¨β© β¨β© β¨β© β¨β© β¨β© β© +</pre> diff --git a/docs/help/identity_left.html b/docs/help/identity_left.html new file mode 100644 index 00000000..a643aed2 --- /dev/null +++ b/docs/help/identity_left.html @@ -0,0 +1,20 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Left Tack (`β£`)</title> +</head> +<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="left-tack-"><a class="header" href="#left-tack-">Left Tack (<code><span class='Function'>β£</span></code>)</a></h1> +<h2 id="--"><a class="header" href="#--"><code><span class='Function'>β£</span> <span class='Value'>π©</span></code>:</a></h2> +<p>Return <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=ICDiiqMgNQ==">βοΈ</a><pre> <span class='Function'>β£</span> <span class='Number'>5</span> +5 +</pre> +<h2 id="---left"><a class="header" href="#---left"><code><span class='Value'>π¨</span> <span class='Function'>β£</span> <span class='Value'>π©</span></code>: Left</a></h2> +<p>Return <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=ICA1IOKKoyA4CgogICdhJyDiiqMgMeKAvzLigL8z">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>β£</span> <span class='Number'>8</span> +5 + + <span class='String'>'a'</span> <span class='Function'>β£</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +'a' +</pre> diff --git a/docs/help/identity_right.html b/docs/help/identity_right.html new file mode 100644 index 00000000..e6867881 --- /dev/null +++ b/docs/help/identity_right.html @@ -0,0 +1,20 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Right Tack (`β’`)</title> +</head> +<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="right-tack-"><a class="header" href="#right-tack-">Right Tack (<code><span class='Function'>β’</span></code>)</a></h1> +<h2 id="--"><a class="header" href="#--"><code><span class='Function'>β’</span> <span class='Value'>π©</span></code>:</a></h2> +<p>Return <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=ICDiiqIgNQ==">βοΈ</a><pre> <span class='Function'>β’</span> <span class='Number'>5</span> +5 +</pre> +<h2 id="---right"><a class="header" href="#---right"><code><span class='Value'>π¨</span> <span class='Function'>β’</span> <span class='Value'>π©</span></code>: Right</a></h2> +<p>Return <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=ICA1IOKKoiA4CgogICdhJyDiiqIgMeKAvzLigL8z">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>β’</span> <span class='Number'>8</span> +8 + + <span class='String'>'a'</span> <span class='Function'>β’</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 2 3 β© +</pre> diff --git a/docs/help/indices_replicate.html b/docs/help/indices_replicate.html new file mode 100644 index 00000000..53979e92 --- /dev/null +++ b/docs/help/indices_replicate.html @@ -0,0 +1,24 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Solidus (`/`)</title> +</head> +<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="solidus-"><a class="header" href="#solidus-">Solidus (<code><span class='Function'>/</span></code>)</a></h1> +<h2 id="--indices"><a class="header" href="#--indices"><code><span class='Function'>/</span> <span class='Value'>π©</span></code>: Indices</a></h2> +<p>Repeat the index of each element in <code><span class='Value'>π©</span></code> by the element's value. <code><span class='Value'>π©</span></code> must be rank 1.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgLyAx4oC/MuKAvzMKCiAgIC8gMeKAvzDigL8x">βοΈ</a><pre> <span class='Function'>/</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 0 1 1 2 2 2 β© + + <span class='Function'>/</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> +β¨ 0 2 β© +</pre> +<h2 id="---replicate"><a class="header" href="#---replicate"><code><span class='Value'>π¨</span> <span class='Function'>/</span> <span class='Value'>π©</span></code>: Replicate</a></h2> +<p>Repeat each major cell in <code><span class='Value'>π©</span></code> by the corresponding element in <code><span class='Value'>π¨</span></code>.</p> +<p>Atomic <code><span class='Value'>π¨</span></code> applies to all elements.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMyAvICJjb3B5IgoKICAgMeKAvzDigL8xIC8gMeKAvzLigL8z">βοΈ</a><pre> <span class='Number'>3</span> <span class='Function'>/</span> <span class='String'>"copy"</span> +"cccooopppyyy" + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> <span class='Function'>/</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 3 β© +</pre> diff --git a/docs/help/join_jointo.html b/docs/help/join_jointo.html new file mode 100644 index 00000000..ccd87b8a --- /dev/null +++ b/docs/help/join_jointo.html @@ -0,0 +1,43 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Lazy S (`βΎ`)</title> +</head> +<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="lazy-s-"><a class="header" href="#lazy-s-">Lazy S (<code><span class='Function'>βΎ</span></code>)</a></h1> +<h2 id="--join--"><a class="header" href="#--join--"><code><span class='Function'>βΎ</span> <span class='Value'>π©</span></code>: Join</a></h2> +<p>Join all elements of <code><span class='Value'>π©</span></code> together.</p> +<p>Element ranks must be compatible.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oi+IOKfqDHigL8yLCAzLCA04oC/NeKfqQoKICAgbSDihpAgKDPigL8x4omN4oycNOKAvzLigL81KSDipYrCqCAy4oC/M+KliuKGlTYKCiAgIOKIviBt">βοΈ</a><pre> <span class='Function'>βΎ</span> <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Separator'>,</span> <span class='Number'>3</span><span class='Separator'>,</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Bracket'>β©</span> +β¨ 1 2 3 4 5 β© + + <span class='Value'>m</span> <span class='Gets'>β</span> <span class='Paren'>(</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Function'>β</span><span class='Modifier'>β</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Paren'>)</span> <span class='Function'>β₯</span><span class='Modifier'>Β¨</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Function'>β₯β</span><span class='Number'>6</span> + + <span class='Function'>βΎ</span> <span class='Value'>m</span> +ββ +β΅ 0 0 0 0 1 1 2 2 2 2 2 + 0 0 0 0 1 1 2 2 2 2 2 + 0 0 0 0 1 1 2 2 2 2 2 + 3 3 3 3 4 4 5 5 5 5 5 + β +</pre> +<h2 id="---join"><a class="header" href="#---join"><code><span class='Value'>π¨</span> <span class='Function'>βΎ</span> <span class='Value'>π©</span></code>: Join</a></h2> +<p>Join <code><span class='Value'>π¨</span></code> to <code><span class='Value'>π©</span></code> along the first axis.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgImFiY2QiIOKIviAiRUZHIgoKICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCiAgIGMg4oaQIDTigL8zIOKliiDihpUxMiAKCiAgIGHiiL5j">βοΈ</a><pre> <span class='String'>"abcd"</span> <span class='Function'>βΎ</span> <span class='String'>"EFG"</span> +"abcdEFG" + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Value'>c</span> <span class='Gets'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>12</span> + + <span class='Value'>a</span><span class='Function'>βΎ</span><span class='Value'>c</span> +ββ +β΅ 0 1 2 + 3 4 5 + 6 7 8 + 0 1 2 + 3 4 5 + 6 7 8 + 9 10 11 + β +</pre> diff --git a/docs/help/length_notequal.html b/docs/help/length_notequal.html new file mode 100644 index 00000000..1b9f1b37 --- /dev/null +++ b/docs/help/length_notequal.html @@ -0,0 +1,35 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Not Equal (`β `)</title> +</head> +<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="not-equal-"><a class="header" href="#not-equal-">Not Equal (<code><span class='Function'>β </span></code>)</a></h1> +<h2 id="--length"><a class="header" href="#--length"><code><span class='Function'>β </span> <span class='Value'>π©</span></code>: Length</a></h2> +<p>Length of the first dimension of <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=ICDiiaAgMwoKICDiiaAg4p+oMSwgMiwgM+KfqQoKICDiiaAgM+KAvzTigL814qWKMAoKICDiiaAgMeKAvzTigL814qWKMAoKICDiiaAgNOKAvzTigL814qWKMA==">βοΈ</a><pre> <span class='Function'>β </span> <span class='Number'>3</span> +1 + + <span class='Function'>β </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> +3 + + <span class='Function'>β </span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Function'>β₯</span><span class='Number'>0</span> +3 + + <span class='Function'>β </span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Function'>β₯</span><span class='Number'>0</span> +1 + + <span class='Function'>β </span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Function'>β₯</span><span class='Number'>0</span> +4 +</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 href="https://mlochbaum.github.io/BQN/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=ICAxIOKJoCAzCgogIDLigL8z4oC/MCDiiaAgM+KAvzHigL8wCgogICdhJyDiiaAgJ2En">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β </span> <span class='Number'>3</span> +1 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β </span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 1 1 0 β© + + <span class='String'>'a'</span> <span class='Function'>β </span> <span class='String'>'a'</span> +0 +</pre> diff --git a/docs/help/lessequal.html b/docs/help/lessequal.html new file mode 100644 index 00000000..061f9756 --- /dev/null +++ b/docs/help/lessequal.html @@ -0,0 +1,16 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Lesser Than or Equal To (`β€`)</title> +</head> +<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="lesser-than-or-equal-to-"><a class="header" href="#lesser-than-or-equal-to-">Lesser Than or Equal To (<code><span class='Function'>β€</span></code>)</a></h1> +<h2 id="---lesser-than-or-equal-to"><a class="header" href="#---lesser-than-or-equal-to"><code><span class='Value'>π¨</span> <span class='Function'>β€</span> <span class='Value'>π©</span></code>: Lesser Than or Equal To</a></h2> +<h2 id="-and--can-both-be-either-numbers-or-characters"><a class="header" href="#-and--can-both-be-either-numbers-or-characters"><code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> can both be either numbers or characters.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIOKJpCAzCgogIDLigL8z4oC/MCDiiaQgM+KAvzHigL8w">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β€</span> <span class='Number'>3</span> +1 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β€</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 1 0 1 β© +</pre> diff --git a/docs/help/markfirst_memberof.html b/docs/help/markfirst_memberof.html new file mode 100644 index 00000000..82ccf437 --- /dev/null +++ b/docs/help/markfirst_memberof.html @@ -0,0 +1,35 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Element Of (`β`)</title> +</head> +<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="element-of-"><a class="header" href="#element-of-">Element Of (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--unique-mask"><a class="header" href="#--unique-mask"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Unique Mask</a></h2> +<p>Mark the first occurrence of each major cell in <code><span class='Value'>π©</span></code> with a 1, and all other occurrences with a 0.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oiKIDTigL814oC/NuKAvzbigL804oC/N+KAvzUKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICDiiIogYQ==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ 1 1 1 0 0 1 0 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +β¨ 1 1 1 β© +</pre> +<h2 id="---member-of"><a class="header" href="#---member-of"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Member Of</a></h2> +<p>Is each element in <code><span class='Value'>π¨</span></code> a major cell of <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=ICAg4p+oMeKfqSDiiIog4oaVOQoKICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCiAgIOKfqDDigL8x4oC/MuKfqSDiiIogYQoKICAg4p+oMeKAvzMg4qWKIDDigL8x4oC/MuKfqSDiiIogYQ==">βοΈ</a><pre> <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> <span class='Function'>β</span> <span class='Function'>β</span><span class='Number'>9</span> +β¨ 1 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Bracket'>β¨</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Bracket'>β©</span> <span class='Function'>β</span> <span class='Value'>a</span> +βΒ· +Β· 0 + β + + <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Bracket'>β©</span> <span class='Function'>β</span> <span class='Value'>a</span> +βΒ· +Β· 0 + β +</pre> diff --git a/docs/help/merge_great.html b/docs/help/merge_great.html new file mode 100644 index 00000000..68e84cdf --- /dev/null +++ b/docs/help/merge_great.html @@ -0,0 +1,37 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Greater Than (`>`)</title> +</head> +<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="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>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> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICBhIOKGkCDin6jin6gxLCAy4p+pLCDin6gzLCA04p+p4p+pCgogID5hCgogIOKJomEKCiAg4omiPmE=">βοΈ</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> +ββ +β΅ 1 2 + 3 4 + β + + <span class='Function'>β’</span><span class='Value'>a</span> +β¨ 2 β© + + <span class='Function'>β’></span><span class='Value'>a</span> +β¨ 2 2 β© +</pre> +<h2 id="---greater-than"><a class="header" href="#---greater-than"><code><span class='Value'>π¨</span> <span class='Function'>></span> <span class='Value'>π©</span></code>: Greater Than</a></h2> +<p><code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> can both be either numbers or characters.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxID4gMwoKICAy4oC/M+KAvzAgPiAz4oC/MeKAvzAKCiAgJ2EnID4gJ2In">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>></span> <span class='Number'>3</span> +0 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>></span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 0 1 0 β© + + <span class='String'>'a'</span> <span class='Function'>></span> <span class='String'>'b'</span> +0 +</pre> diff --git a/docs/help/negate_subtract.html b/docs/help/negate_subtract.html new file mode 100644 index 00000000..f226e61c --- /dev/null +++ b/docs/help/negate_subtract.html @@ -0,0 +1,31 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Minus (`-`)</title> +</head> +<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="minus--"><a class="header" href="#minus--">Minus (<code><span class='Function'>-</span></code>)</a></h1> +<h2 id="---negate"><a class="header" href="#---negate"><code><span class='Function'>-</span> <span class='Value'>π©</span></code>: Negate</a></h2> +<p>Additive Inverse of <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAtIDEKCiAgLSDCrzE=">βοΈ</a><pre> <span class='Function'>-</span> <span class='Number'>1</span> +Β―1 + + <span class='Function'>-</span> <span class='Number'>Β―1</span> +1 +</pre> +<h2 id="----subtract"><a class="header" href="#----subtract"><code><span class='Value'>π¨</span> <span class='Function'>-</span> <span class='Value'>π©</span></code>: Subtract</a></h2> +<p>Subtract <code><span class='Value'>π©</span></code> from <code><span class='Value'>π¨</span></code>. <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> can be characters or integers.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIC0gMgoKICAxIC0gMuKAvzPigL80CgogICdhJyAtIDQKCiAgJ2InIC0gJ2En">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>-</span> <span class='Number'>2</span> +Β―1 + + <span class='Number'>1</span> <span class='Function'>-</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ Β―1 Β―2 Β―3 β© + + <span class='String'>'a'</span> <span class='Function'>-</span> <span class='Number'>4</span> +']' + + <span class='String'>'b'</span> <span class='Function'>-</span> <span class='String'>'a'</span> +1 +</pre> diff --git a/docs/help/not_span.html b/docs/help/not_span.html new file mode 100644 index 00000000..d6fd4cf3 --- /dev/null +++ b/docs/help/not_span.html @@ -0,0 +1,25 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Not (`Β¬`)</title> +</head> +<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="not-"><a class="header" href="#not-">Not (<code><span class='Function'>Β¬</span></code>)</a></h1> +<h2 id="--logical-not--"><a class="header" href="#--logical-not--"><code><span class='Function'>Β¬</span> <span class='Value'>π©</span></code>: Logical Not</a></h2> +<p>Logical Not of <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDCrCAwCgogIMKsIDHigL8w">βοΈ</a><pre> <span class='Function'>Β¬</span> <span class='Number'>0</span> +1 + + <span class='Function'>Β¬</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 0 1 β© +</pre> +<h2 id="---span"><a class="header" href="#---span"><code><span class='Value'>π¨</span> <span class='Function'>Β¬</span> <span class='Value'>π©</span></code>: Span</a></h2> +<p>Count of numbers in the inclusive range from <code><span class='Value'>π©</span></code> to <code><span class='Value'>π¨</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAzIMKsIDEKCiAgM+KAvzQgwqwgMOKAvzI=">βοΈ</a><pre> <span class='Number'>3</span> <span class='Function'>Β¬</span> <span class='Number'>1</span> +3 + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>Β¬</span> <span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> +β¨ 4 3 β© +</pre> diff --git a/docs/help/occcount_progindex.html b/docs/help/occcount_progindex.html new file mode 100644 index 00000000..cb0c320f --- /dev/null +++ b/docs/help/occcount_progindex.html @@ -0,0 +1,26 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Square Original Of or Equal To (`β`)</title> +</head> +<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="square-original-of-or-equal-to-"><a class="header" href="#square-original-of-or-equal-to-">Square Original Of or Equal To (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--occurrence-count"><a class="header" href="#--occurrence-count"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Occurrence Count</a></h2> +<p>Number of times each major cell of <code><span class='Value'>π©</span></code> appears before itself.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgIOKKkiAgIDLigL834oC/MeKAvzjigL8x4oC/N+KAvzHigL844oC/MuKAvzjigL80CgogICAg4omN4p+c4oqSIDLigL834oC/MeKAvzjigL8x4oC/N+KAvzHigL844oC/MuKAvzjigL80">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ 0 0 0 0 1 1 2 1 1 2 0 β© + + <span class='Function'>β</span><span class='Modifier2'>β</span><span class='Function'>β</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>7</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +ββ +β΅ 2 7 1 8 1 7 1 8 2 8 4 + 0 0 0 0 1 1 2 1 1 2 0 + β +</pre> +<h2 id="---progressive-index-of"><a class="header" href="#---progressive-index-of"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Progressive Index Of</a></h2> +<p>Index of the first unused match of each major cell of <code><span class='Value'>π©</span></code> in <code><span class='Value'>π¨</span></code>. If there are no more matches left, length of <code><span class='Value'>π¨</span></code> is placed in that position.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgICJhYWEiIOKKkiAiYWFhYWEiCgogICAgImFhYWJiIiDiipIgImFiYWJhYmFiYWIi">βοΈ</a><pre> <span class='String'>"aaa"</span> <span class='Function'>β</span> <span class='String'>"aaaaa"</span> +β¨ 0 1 2 3 3 β© + + <span class='String'>"aaabb"</span> <span class='Function'>β</span> <span class='String'>"ababababab"</span> +β¨ 0 3 1 4 2 5 5 5 5 5 β© +</pre> diff --git a/docs/help/over.html b/docs/help/over.html new file mode 100644 index 00000000..a7629b90 --- /dev/null +++ b/docs/help/over.html @@ -0,0 +1,28 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle (`β`)</title> +</head> +<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="circle-"><a class="header" href="#circle-">Circle (<code><span class='Modifier2'>β</span></code>)</a></h1> +<h2 id="--atop"><a class="header" href="#--atop"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Atop</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π©</span></code>, then apply <code><span class='Function'>π½</span></code> (<code><span class='Function'>π½</span> <span class='Function'>πΎ</span> <span class='Value'>π©</span></code>).</p> +<h2 id="-and--must-be-monadic"><a class="header" href="#-and--must-be-monadic"><code><span class='Function'>π½</span></code> and <code><span class='Function'>πΎ</span></code> must be monadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgLeKXiy0gNQoKICAgLSAtIDU=">βοΈ</a><pre> <span class='Function'>-</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>5</span> +5 + + <span class='Function'>-</span> <span class='Function'>-</span> <span class='Number'>5</span> +5 +</pre> +<h2 id="---over"><a class="header" href="#---over"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Over</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code>, then apply <code><span class='Function'>π½</span></code> to them (<code><span class='Paren'>(</span><span class='Function'>πΎ</span> <span class='Value'>π¨</span><span class='Paren'>)</span> <span class='Function'>π½</span> <span class='Paren'>(</span><span class='Function'>πΎ</span> <span class='Value'>π©</span><span class='Paren'>)</span></code>).</p> +<h2 id="-must-be-dyadic--must-be-monadic"><a class="header" href="#-must-be-dyadic--must-be-monadic"><code><span class='Function'>π½</span></code> must be dyadic, <code><span class='Function'>πΎ</span></code> must be monadic.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMSAr4peLLSAyCgogICAxICsgLSAyCgogICAoLSAxKSArICgtIDIp">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>2</span> +Β―3 + + <span class='Number'>1</span> <span class='Function'>+</span> <span class='Function'>-</span> <span class='Number'>2</span> +Β―1 + + <span class='Paren'>(</span><span class='Function'>-</span> <span class='Number'>1</span><span class='Paren'>)</span> <span class='Function'>+</span> <span class='Paren'>(</span><span class='Function'>-</span> <span class='Number'>2</span><span class='Paren'>)</span> +Β―3 +</pre> diff --git a/docs/help/prefixes_take.html b/docs/help/prefixes_take.html new file mode 100644 index 00000000..61d27740 --- /dev/null +++ b/docs/help/prefixes_take.html @@ -0,0 +1,56 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Up Arrow (`β`)</title> +</head> +<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="up-arrow-"><a class="header" href="#up-arrow-">Up Arrow (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--prefixes"><a class="header" href="#--prefixes"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Prefixes</a></h2> +<p>Prefixes of array <code><span class='Value'>π©</span></code> along its first axis.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oaRIDHigL8y4oC/M+KAvzQKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICDihpEgYQ==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ β¨β© β¨ 1 β© β¨ 1 2 β© β¨ 1 2 3 β© β¨ 1 2 3 4 β© β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +ββ +Β· β0βΏ3 ββ ββ ββ + β΅ 0 1 2 β΅ 0 1 2 β΅ 0 1 2 + β 3 4 5 3 4 5 + β 6 7 8 + β + β +</pre> +<h2 id="---take"><a class="header" href="#---take"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Take</a></h2> +<p>For each integer in <code><span class='Value'>π¨</span></code>, take that many elements from each dimension of <code><span class='Value'>π©</span></code>.</p> +<p>Negative numbers take from the end.</p> +<p>If any of the elements in <code><span class='Value'>π¨</span></code> are greater than the length of their respective dimension, the dimension is extended with a fill value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAzIOKGkSAx4oC/M+KAvzXigL82NwoKICBhIOKGkCA04oC/NCDipYog4oaVMTYKCiAgM+KAvzMg4oaRIGEKCiAgNeKAvzUg4oaRIGEKCiAgM+KAv8KvMyDihpEgYQ==">βοΈ</a><pre> <span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>67</span> +β¨ 1 3 5 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>16</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +β΅ 0 1 2 + 3 4 5 + 6 7 8 + β + + <span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +β΅ 0 1 2 0 0 + 3 4 5 0 0 + 6 7 8 0 0 + 0 0 0 0 0 + 0 0 0 0 0 + β + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>Β―3</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +β΅ 0 1 2 + 3 4 5 + 6 7 8 + β +</pre> diff --git a/docs/help/range_windows.html b/docs/help/range_windows.html new file mode 100644 index 00000000..7af5a587 --- /dev/null +++ b/docs/help/range_windows.html @@ -0,0 +1,48 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Up Down Arrow (`β`)</title> +</head> +<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="up-down-arrow-"><a class="header" href="#up-down-arrow-">Up Down Arrow (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--range--"><a class="header" href="#--range--"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Range</a></h2> +<p>Return all indices to index into an array of shape <code><span class='Value'>π©</span></code>, in the shape described by <code><span class='Value'>π©</span></code>.</p> +<p>When given a single number, range from 0 to <code><span class='Value'>π©</span><span class='Function'>-</span><span class='Number'>1</span></code>.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oaVIDQKCiAgIOKGlSA04oC/NQ==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>4</span> +β¨ 0 1 2 3 β© + + <span class='Function'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +ββ +β΅ β¨ 0 0 β© β¨ 0 1 β© β¨ 0 2 β© β¨ 0 3 β© β¨ 0 4 β© + β¨ 1 0 β© β¨ 1 1 β© β¨ 1 2 β© β¨ 1 3 β© β¨ 1 4 β© + β¨ 2 0 β© β¨ 2 1 β© β¨ 2 2 β© β¨ 2 3 β© β¨ 2 4 β© + β¨ 3 0 β© β¨ 3 1 β© β¨ 3 2 β© β¨ 3 3 β© β¨ 3 4 β© + β +</pre> +<h2 id="---windows"><a class="header" href="#---windows"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Windows</a></h2> +<p>Overlapping slices of <code><span class='Value'>π©</span></code> which are of shape <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=ICAgNSDihpUgImFiY2RlZmciCgogICBhIOKGkCAz4oC/M+KliuKGlTkKCiAgIDLigL8yIOKGlSBh">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>β</span> <span class='String'>"abcdefg"</span> +ββ +β΅"abcde + bcdef + cdefg" + β + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Function'>β₯β</span><span class='Number'>9</span> + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +β 0 1 + 3 4 + + 1 2 + 4 5 + + + 3 4 + 6 7 + + 4 5 + 7 8 + β +</pre> diff --git a/docs/help/rank.html b/docs/help/rank.html new file mode 100644 index 00000000..b0b7192b --- /dev/null +++ b/docs/help/rank.html @@ -0,0 +1,29 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circled Horizontal Bar With Notch (`β`)</title> +</head> +<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>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> +<li><code><span class='Modifier2'>β</span> <span class='Value'>b</span><span class='Ligature'>βΏ</span><span class='Value'>c</span></code> β Rank-b cells of <code><span class='Value'>π¨</span></code> and rank-c cells of <code><span class='Value'>π©</span></code> (dyadic)</li> +<li><code><span class='Modifier2'>β</span> <span class='Value'>a</span><span class='Ligature'>βΏ</span><span class='Value'>b</span><span class='Ligature'>βΏ</span><span class='Value'>c</span></code> β Rank-a cells of <code><span class='Value'>π©</span></code> (monadic), b-cells of <code><span class='Value'>π¨</span></code> and c-cells of <code><span class='Value'>π©</span></code> (dyadic)</li> +</ul> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgYSDihpAgM+KAvzLigL804qWKIkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaIgoKICAg4oy94o6JMiBh">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Function'>β₯</span><span class='String'>"ABCDEFGHIJKLMNOPQRSTUVWXYZ"</span> + + <span class='Function'>β½</span><span class='Modifier2'>β</span><span class='Number'>2</span> <span class='Value'>a</span> +ββ +β"EFGH + ABCD + + Β·MNOP + IJKL + + Β·UVWX + QRST" + β +</pre> diff --git a/docs/help/rank_equal.html b/docs/help/rank_equal.html new file mode 100644 index 00000000..7075284f --- /dev/null +++ b/docs/help/rank_equal.html @@ -0,0 +1,44 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Equal (`=`)</title> +</head> +<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="equal-"><a class="header" href="#equal-">Equal (<code><span class='Function'>=</span></code>)</a></h1> +<h2 id="--rank"><a class="header" href="#--rank"><code><span class='Function'>=</span> <span class='Value'>π©</span></code>: Rank</a></h2> +<p>Returns the number of dimensions 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=ICA9IDAKCiAgPSAz4qWKMAoKICA9IDPigL8z4qWKMAoKICAz4oC/M+KAvzMg4qWKIOKfqOKfqDDin6nin6k=">βοΈ</a><pre> <span class='Function'>=</span> <span class='Number'>0</span> +0 + + <span class='Function'>=</span> <span class='Number'>3</span><span class='Function'>β₯</span><span class='Number'>0</span> +1 + + <span class='Function'>=</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Function'>β₯</span><span class='Number'>0</span> +2 + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Bracket'>β¨β¨</span><span class='Number'>0</span><span class='Bracket'>β©β©</span> +ββ +β β¨ 0 β© β¨ 0 β© β¨ 0 β© + β¨ 0 β© β¨ 0 β© β¨ 0 β© + β¨ 0 β© β¨ 0 β© β¨ 0 β© + + β¨ 0 β© β¨ 0 β© β¨ 0 β© + β¨ 0 β© β¨ 0 β© β¨ 0 β© + β¨ 0 β© β¨ 0 β© β¨ 0 β© + + β¨ 0 β© β¨ 0 β© β¨ 0 β© + β¨ 0 β© β¨ 0 β© β¨ 0 β© + β¨ 0 β© β¨ 0 β© β¨ 0 β© + β +</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 href="https://mlochbaum.github.io/BQN/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=ICAxID0gMwoKICAy4oC/M+KAvzAgPSAz4oC/MeKAvzAKCiAgJ2EnID0gJ2En">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>=</span> <span class='Number'>3</span> +0 + + <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>=</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> +β¨ 0 0 1 β© + + <span class='String'>'a'</span> <span class='Function'>=</span> <span class='String'>'a'</span> +1 +</pre> diff --git a/docs/help/reciprocal_divide.html b/docs/help/reciprocal_divide.html new file mode 100644 index 00000000..7aaee42d --- /dev/null +++ b/docs/help/reciprocal_divide.html @@ -0,0 +1,22 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Divide (`Γ·`)</title> +</head> +<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="divide-"><a class="header" href="#divide-">Divide (<code><span class='Function'>Γ·</span></code>)</a></h1> +<h2 id="--reciprocal--"><a class="header" href="#--reciprocal--"><code><span class='Function'>Γ·</span> <span class='Value'>π©</span></code>: Reciprocal</a></h2> +<p>Gives <code><span class='Number'>1</span> <span class='Function'>Γ·</span> <span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDDtyA1">βοΈ</a><pre> <span class='Function'>Γ·</span> <span class='Number'>5</span> +0.2 +</pre> +<h2 id="---divide"><a class="header" href="#---divide"><code><span class='Value'>π¨</span> <span class='Function'>Γ·</span> <span class='Value'>π©</span></code>: Divide</a></h2> +<h2 id="-divided-by-"><a class="header" href="#-divided-by-"><code><span class='Value'>π¨</span></code> divided by <code><span class='Value'>π©</span></code>.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=NSDDtyA0CgoxNCDDtyA3">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>Γ·</span> <span class='Number'>4</span> +1.25 + + <span class='Number'>14</span> <span class='Function'>Γ·</span> <span class='Number'>7</span> +2 +</pre> diff --git a/docs/help/repeat.html b/docs/help/repeat.html new file mode 100644 index 00000000..b9cb2cb0 --- /dev/null +++ b/docs/help/repeat.html @@ -0,0 +1,19 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle Star (`β`)</title> +</head> +<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="circle-star-"><a class="header" href="#circle-star-">Circle Star (<code><span class='Modifier2'>β</span></code>)</a></h1> +<h2 id="-----repeat"><a class="header" href="#-----repeat"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Repeat</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> and apply <code><span class='Function'>π½</span></code> to <code><span class='Value'>π©</span></code> that may times. If <code><span class='Value'>π¨</span></code> is given, keep it as a constant left argument.</p> +<p>If <code><span class='Function'>πΎ</span></code> returns an array, give <code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Value'>π©</span></code> for each element.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMSAr4o2f4oqiIDQKCiAgIDEgK+KNnzHigL8y4oC/MyA0CgogICAzIOKIvuKNn3viiaDwnZWpfSDin6g0LDUsNuKfqQ==">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span><span class='Modifier2'>β</span><span class='Function'>β’</span> <span class='Number'>4</span> +8 + + <span class='Number'>1</span> <span class='Function'>+</span><span class='Modifier2'>β</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Number'>4</span> +β¨ 5 6 7 β© + + <span class='Number'>3</span> <span class='Function'>βΎ</span><span class='Modifier2'>β</span><span class='Brace'>{</span><span class='Function'>β </span><span class='Value'>π©</span><span class='Brace'>}</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> +β¨ 3 3 3 4 5 6 β© +</pre> diff --git a/docs/help/reverse_rotate.html b/docs/help/reverse_rotate.html new file mode 100644 index 00000000..10b7cbb0 --- /dev/null +++ b/docs/help/reverse_rotate.html @@ -0,0 +1,36 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle Stile (`β½`)</title> +</head> +<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="circle-stile-"><a class="header" href="#circle-stile-">Circle Stile (<code><span class='Function'>β½</span></code>)</a></h1> +<h2 id="--reverse--"><a class="header" href="#--reverse--"><code><span class='Function'>β½</span> <span class='Value'>π©</span></code>: Reverse</a></h2> +<p>Reverse the first axis of <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=ICAg4oy9IDHigL8y4oC/MwoKICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCiAgIOKMvSBh">βοΈ</a><pre> <span class='Function'>β½</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 3 2 1 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β½</span> <span class='Value'>a</span> +ββ +β΅ 6 7 8 + 3 4 5 + 0 1 2 + β +</pre> +<h2 id="---dyad"><a class="header" href="#---dyad"><code><span class='Value'>π¨</span> <span class='Function'>β½</span> <span class='Value'>π©</span></code>: Dyad</a></h2> +<p>Move the first <code><span class='Value'>π¨</span></code> elements of <code><span class='Value'>π©</span></code> to its end. Negative <code><span class='Value'>π¨</span></code> reverses the direction of rotation.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMiDijL0gMeKAvzLigL8zCgogICBhIOKGkCAz4oC/MyDipYog4oaVOQoKICAgMiDijL0gYQ==">βοΈ</a><pre> <span class='Number'>2</span> <span class='Function'>β½</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 3 1 2 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Number'>2</span> <span class='Function'>β½</span> <span class='Value'>a</span> +ββ +β΅ 6 7 8 + 0 1 2 + 3 4 5 + β +</pre> diff --git a/docs/help/scan.html b/docs/help/scan.html new file mode 100644 index 00000000..9ddf093a --- /dev/null +++ b/docs/help/scan.html @@ -0,0 +1,35 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Grave (`` ` ``)</title> +</head> +<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="grave---"><a class="header" href="#grave---">Grave (<code><span class='Modifier'>`</span></code>)</a></h1> +<h2 id="--fold"><a class="header" href="#--fold"><code><span class='Function'>π½</span><span class='Modifier'>`</span> <span class='Value'>π©</span></code>: Fold</a></h2> +<p>Scan over <code><span class='Value'>π©</span></code> with <code><span class='Function'>π½</span></code> from left to right, producing intermediate values.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgK2AgMeKAvzLigL8zCgogICDin6gxLCAxKzIsICgxKzIpKzPin6kKCiAgIC1gIDHigL8y4oC/MwoKICAg4p+oMSwgMS0yLCAoMS0yKS0z4p+p">βοΈ</a><pre> <span class='Function'>+</span><span class='Modifier'>`</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 3 6 β© + + <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>1</span><span class='Function'>+</span><span class='Number'>2</span><span class='Separator'>,</span> <span class='Paren'>(</span><span class='Number'>1</span><span class='Function'>+</span><span class='Number'>2</span><span class='Paren'>)</span><span class='Function'>+</span><span class='Number'>3</span><span class='Bracket'>β©</span> +β¨ 1 3 6 β© + + <span class='Function'>-</span><span class='Modifier'>`</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 Β―1 Β―4 β© + + <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Number'>1</span><span class='Function'>-</span><span class='Number'>2</span><span class='Separator'>,</span> <span class='Paren'>(</span><span class='Number'>1</span><span class='Function'>-</span><span class='Number'>2</span><span class='Paren'>)</span><span class='Function'>-</span><span class='Number'>3</span><span class='Bracket'>β©</span> +β¨ 1 Β―1 Β―4 β© +</pre> +<h2 id="---scan-with-initial"><a class="header" href="#---scan-with-initial"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>`</span> <span class='Value'>π©</span></code>: Scan With initial</a></h2> +<p>Monadic scan, but use <code><span class='Value'>π¨</span></code> as initial left argument.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgNSArYCAx4oC/MuKAvzMKCiAgIOKfqDUrMSwgKDUrMSkrMiwgKCg1KzEpKzIpKzPin6kKCiAgIDUgLWAgMeKAvzLigL8zCgogICDin6g1LTEsICg1LTEpLTIsICgoNS0xKS0yKS0z4p+p">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>+</span><span class='Modifier'>`</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 6 8 11 β© + + <span class='Bracket'>β¨</span><span class='Number'>5</span><span class='Function'>+</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Paren'>(</span><span class='Number'>5</span><span class='Function'>+</span><span class='Number'>1</span><span class='Paren'>)</span><span class='Function'>+</span><span class='Number'>2</span><span class='Separator'>,</span> <span class='Paren'>((</span><span class='Number'>5</span><span class='Function'>+</span><span class='Number'>1</span><span class='Paren'>)</span><span class='Function'>+</span><span class='Number'>2</span><span class='Paren'>)</span><span class='Function'>+</span><span class='Number'>3</span><span class='Bracket'>β©</span> +β¨ 6 8 11 β© + + <span class='Number'>5</span> <span class='Function'>-</span><span class='Modifier'>`</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 4 2 Β―1 β© + + <span class='Bracket'>β¨</span><span class='Number'>5</span><span class='Function'>-</span><span class='Number'>1</span><span class='Separator'>,</span> <span class='Paren'>(</span><span class='Number'>5</span><span class='Function'>-</span><span class='Number'>1</span><span class='Paren'>)</span><span class='Function'>-</span><span class='Number'>2</span><span class='Separator'>,</span> <span class='Paren'>((</span><span class='Number'>5</span><span class='Function'>-</span><span class='Number'>1</span><span class='Paren'>)</span><span class='Function'>-</span><span class='Number'>2</span><span class='Paren'>)</span><span class='Function'>-</span><span class='Number'>3</span><span class='Bracket'>β©</span> +β¨ 4 2 Β―1 β© +</pre> diff --git a/docs/help/self_swap.html b/docs/help/self_swap.html new file mode 100644 index 00000000..2115ac69 --- /dev/null +++ b/docs/help/self_swap.html @@ -0,0 +1,23 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Small Tilde (`Λ`)</title> +</head> +<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="small-tilde-"><a class="header" href="#small-tilde-">Small Tilde (<code><span class='Modifier'>Λ</span></code>)</a></h1> +<h2 id="--self"><a class="header" href="#--self"><code><span class='Function'>π½</span><span class='Modifier'>Λ</span> <span class='Value'>π©</span></code>: Self</a></h2> +<p>Supplies <code><span class='Value'>π©</span></code> as a left argument to <code><span class='Function'>π½</span></code> (<code><span class='Value'>π©</span> <span class='Function'>π½</span> <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=ICAgMSArIDEKCiAgICvLnCAx">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>1</span> +2 + + <span class='Function'>+</span><span class='Modifier'>Λ</span> <span class='Number'>1</span> +2 +</pre> +<h2 id="---swap"><a class="header" href="#---swap"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>Λ</span> <span class='Value'>π©</span></code>: Swap</a></h2> +<p>Swaps the arguments of <code><span class='Function'>π½</span></code> (<code><span class='Value'>π©</span> <span class='Function'>π½</span> <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=ICAgMSAtIDIKCiAgIDEgLcucIDI=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>-</span> <span class='Number'>2</span> +Β―1 + + <span class='Number'>1</span> <span class='Function'>-</span><span class='Modifier'>Λ</span> <span class='Number'>2</span> +1 +</pre> diff --git a/docs/help/shape_notmatch.html b/docs/help/shape_notmatch.html new file mode 100644 index 00000000..459237e3 --- /dev/null +++ b/docs/help/shape_notmatch.html @@ -0,0 +1,26 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Not Identical To (`β’`)</title> +</head> +<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="not-identical-to-"><a class="header" href="#not-identical-to-">Not Identical To (<code><span class='Function'>β’</span></code>)</a></h1> +<h2 id="--shape"><a class="header" href="#--shape"><code><span class='Function'>β’</span> <span class='Value'>π©</span></code>: Shape</a></h2> +<p>Length of each dimension of x.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICDiiaIgMQoKICDiiaIgMeKAvzIKCiAg4omiIDHigL8yIOKJjSAz4oC/NA==">βοΈ</a><pre> <span class='Function'>β’</span> <span class='Number'>1</span> +β¨β© + + <span class='Function'>β’</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> +β¨ 2 β© + + <span class='Function'>β’</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ 2 2 β© +</pre> +<h2 id="---not-match"><a class="header" href="#---not-match"><code><span class='Value'>π¨</span> <span class='Function'>β’</span> <span class='Value'>π©</span></code>: Not Match</a></h2> +<p>Does <code><span class='Value'>π¨</span></code> not exactly match <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=ICAxIOKJoiDin6gx4p+pCgogIOKfqDHin6kg4omiIOKfqDHin6k=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β’</span> <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> +1 + + <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> <span class='Function'>β’</span> <span class='Bracket'>β¨</span><span class='Number'>1</span><span class='Bracket'>β©</span> +0 +</pre> diff --git a/docs/help/shiftafter.html b/docs/help/shiftafter.html new file mode 100644 index 00000000..0254594a --- /dev/null +++ b/docs/help/shiftafter.html @@ -0,0 +1,36 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Right Pointing Double Angle Quotation (`Β»`)</title> +</head> +<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="right-pointing-double-angle-quotation-"><a class="header" href="#right-pointing-double-angle-quotation-">Right Pointing Double Angle Quotation (<code><span class='Function'>Β»</span></code>)</a></h1> +<h2 id="--shift-after"><a class="header" href="#--shift-after"><code><span class='Function'>Β»</span> <span class='Value'>π©</span></code>: Shift After</a></h2> +<p>Remove the last element of <code><span class='Value'>π©</span></code>, add a cell of fill values to the start of the first axis of <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=ICAgwrsgMeKAvzLigL8zCgogICDCuyAz4oC/MyDipYogOQ==">βοΈ</a><pre> <span class='Function'>Β»</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 0 1 2 β© + + <span class='Function'>Β»</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>9</span> +ββ +β΅ 0 0 0 + 9 9 9 + 9 9 9 + β +</pre> +<h2 id="---shift-after"><a class="header" href="#---shift-after"><code><span class='Value'>π¨</span> <span class='Function'>Β»</span> <span class='Value'>π©</span></code>: Shift After</a></h2> +<p>Remove the last <code><span class='Function'>β </span><span class='Value'>π¨</span></code> (length) major cells from <code><span class='Value'>π©</span></code>, join <code><span class='Value'>π¨</span></code> to the start of <code><span class='Value'>π©</span></code>. Ranks must match.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgNzggwrsgMeKAvzLigL8zCgogICAx4oC/MiDCuyAx4oC/MuKAvzMKCiAgIGEg4oaQIDPigL8zIOKliiA5CgogICAx4oC/MuKAvzMgwrsgYQ==">βοΈ</a><pre> <span class='Number'>78</span> <span class='Function'>Β»</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 78 1 2 β© + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>Β»</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 2 1 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>9</span> + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>Β»</span> <span class='Value'>a</span> +ββ +β΅ 1 2 3 + 9 9 9 + 9 9 9 + β +</pre> diff --git a/docs/help/shiftbefore.html b/docs/help/shiftbefore.html new file mode 100644 index 00000000..ec12f634 --- /dev/null +++ b/docs/help/shiftbefore.html @@ -0,0 +1,36 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Left Pointing Double Angle Quotation (`Β«`)</title> +</head> +<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="left-pointing-double-angle-quotation-"><a class="header" href="#left-pointing-double-angle-quotation-">Left Pointing Double Angle Quotation (<code><span class='Function'>Β«</span></code>)</a></h1> +<h2 id="--shift-before"><a class="header" href="#--shift-before"><code><span class='Function'>Β«</span> <span class='Value'>π©</span></code>: Shift Before</a></h2> +<p>Remove the first element of <code><span class='Value'>π©</span></code>, add a cell of fill values to the end of the first axis of <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=ICAgNzggwqsgMeKAvzLigL8zCgogICDCqyAx4oC/MuKAvzMKCiAgIMKrIDPigL8zIOKliiA5">βοΈ</a><pre> <span class='Number'>78</span> <span class='Function'>Β«</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 2 3 78 β© + + <span class='Function'>Β«</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 2 3 0 β© + + <span class='Function'>Β«</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>9</span> +ββ +β΅ 9 9 9 + 9 9 9 + 0 0 0 + β +</pre> +<h2 id="---shift-before"><a class="header" href="#---shift-before"><code><span class='Value'>π¨</span> <span class='Function'>Β«</span> <span class='Value'>π©</span></code>: Shift Before</a></h2> +<p>Remove the first <code><span class='Function'>β </span><span class='Value'>π¨</span></code> (length) major cells from <code><span class='Value'>π©</span></code>, join <code><span class='Value'>π¨</span></code> to the end of <code><span class='Value'>π©</span></code>. Ranks must match.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgOOKAvzUgwqsgMeKAvzLigL8zCgogICBhIOKGkCAz4oC/MyDipYogOQoKICAgMeKAvzLigL8zIMKrIGE=">βοΈ</a><pre> <span class='Number'>8</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> <span class='Function'>Β«</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 3 8 5 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Number'>9</span> + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>Β«</span> <span class='Value'>a</span> +ββ +β΅ 9 9 9 + 9 9 9 + 1 2 3 + β +</pre> diff --git a/docs/help/sign_multiply.html b/docs/help/sign_multiply.html new file mode 100644 index 00000000..e6eaf594 --- /dev/null +++ b/docs/help/sign_multiply.html @@ -0,0 +1,27 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Times (`Γ`)</title> +</head> +<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="times-"><a class="header" href="#times-">Times (<code><span class='Function'>Γ</span></code>)</a></h1> +<h2 id="--sign--"><a class="header" href="#--sign--"><code><span class='Function'>Γ</span> <span class='Value'>π©</span></code>: Sign</a></h2> +<p>Sign of <code><span class='Value'>π©</span></code>.</p> +<ul> +<li><code><span class='Number'>Β―1</span></code> if <code><span class='Value'>π©</span> <span class='Function'><</span> <span class='Number'>0</span></code></li> +<li><code><span class='Number'>0</span></code> if <code><span class='Value'>π©</span> <span class='Function'>=</span> <span class='Number'>0</span></code></li> +<li><code><span class='Number'>1</span></code> if <code><span class='Value'>π©</span> <span class='Function'>></span> <span class='Number'>0</span></code></li> +</ul> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDDlyDCrzXigL8w4oC/NeKAvzE=">βοΈ</a><pre> <span class='Function'>Γ</span> <span class='Number'>Β―5</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> +β¨ Β―1 0 1 1 β© +</pre> +<h2 id="---multiply"><a class="header" href="#---multiply"><code><span class='Value'>π¨</span> <span class='Function'>Γ</span> <span class='Value'>π©</span></code>: Multiply</a></h2> +<h2 id="-multiplied-by-"><a class="header" href="#-multiplied-by-"><code><span class='Value'>π¨</span></code> multiplied by <code><span class='Value'>π©</span></code>.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIMOXIDIKCiAgMiDDlyAy4oC/M+KAvzQ=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>Γ</span> <span class='Number'>2</span> +2 + + <span class='Number'>2</span> <span class='Function'>Γ</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ 4 6 8 β© +</pre> diff --git a/docs/help/solo_couple.html b/docs/help/solo_couple.html new file mode 100644 index 00000000..7c663d1a --- /dev/null +++ b/docs/help/solo_couple.html @@ -0,0 +1,51 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Tape (`β`)</title> +</head> +<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="tape-"><a class="header" href="#tape-">Tape (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--solo-"><a class="header" href="#--solo-"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Solo</a></h2> +<p>Add a dimension to <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=ICDiiY0gMQoKICAKICDiiY3iiY0gMQoKICAKIOKJjeKJjeKJjSAxCgogIAog4omN4omNIDHigL8y4oC/M+KAvzQKCiAgCiDiiY3iiY3iiY0gMeKAvzLigL8z4oC/NA==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>1</span> +β¨ 1 β© + + +<span class='Error'>Error: Empty program</span> + <span class='Function'>ββ</span> <span class='Number'>1</span> +ββ +β΅ 1 + β + + +<span class='Error'>Error: Empty program</span> + <span class='Function'>βββ</span> <span class='Number'>1</span> +ββ +β 1 + β + + +<span class='Error'>Error: Empty program</span> + <span class='Function'>ββ</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +ββ +β 1 2 3 4 + β + + +<span class='Error'>Error: Empty program</span> + <span class='Function'>βββ</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +ββ +β 1 2 3 4 + β +</pre> +<h2 id="---couple"><a class="header" href="#---couple"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Couple</a></h2> +<p>Join <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code> along a newly created axis.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMSDiiY0gMwoKICAgMeKAvzIg4omNIDLigL8z">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β</span> <span class='Number'>3</span> +β¨ 1 3 β© + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span> <span class='Function'>β</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +ββ +β΅ 1 2 + 2 3 + β +</pre> diff --git a/docs/help/sortdown_or.html b/docs/help/sortdown_or.html new file mode 100644 index 00000000..6b070b80 --- /dev/null +++ b/docs/help/sortdown_or.html @@ -0,0 +1,24 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Logical Or (`β¨`)</title> +</head> +<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="logical-or-"><a class="header" href="#logical-or-">Logical Or (<code><span class='Function'>β¨</span></code>)</a></h1> +<h2 id="--sort-down"><a class="header" href="#--sort-down"><code><span class='Function'>β¨</span> <span class='Value'>π©</span></code>: Sort Down</a></h2> +<p>Sort array <code><span class='Value'>π©</span></code> in descending order.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICDiiKggM+KAvzHigL804oC/MeKAvzU=">βοΈ</a><pre> <span class='Function'>β¨</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ 5 4 3 1 1 β© +</pre> +<h2 id="---logical-or"><a class="header" href="#---logical-or"><code><span class='Value'>π¨</span> <span class='Function'>β¨</span> <span class='Value'>π©</span></code>: Logical Or</a></h2> +<p>Logical Or of <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIOKIqCAwCgogIDHigL8wIOKIqCAx4oC/MQoKICAwIOKIqCAw">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β¨</span> <span class='Number'>0</span> +1 + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β¨</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> +β¨ 1 1 β© + + <span class='Number'>0</span> <span class='Function'>β¨</span> <span class='Number'>0</span> +0 +</pre> diff --git a/docs/help/sortup_and.html b/docs/help/sortup_and.html new file mode 100644 index 00000000..24516c59 --- /dev/null +++ b/docs/help/sortup_and.html @@ -0,0 +1,21 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Logical And (`β§`)</title> +</head> +<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="logical-and-"><a class="header" href="#logical-and-">Logical And (<code><span class='Function'>β§</span></code>)</a></h1> +<h2 id="--sort-up"><a class="header" href="#--sort-up"><code><span class='Function'>β§</span> <span class='Value'>π©</span></code>: Sort Up</a></h2> +<p>Sort array <code><span class='Value'>π©</span></code> in ascending order.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICDiiKcgM+KAvzHigL804oC/MeKAvzU=">βοΈ</a><pre> <span class='Function'>β§</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> +β¨ 1 1 3 4 5 β© +</pre> +<h2 id="---logical-and"><a class="header" href="#---logical-and"><code><span class='Value'>π¨</span> <span class='Function'>β§</span> <span class='Value'>π©</span></code>: Logical And</a></h2> +<p>Logical And of <code><span class='Value'>π¨</span></code> and <code><span class='Value'>π©</span></code>.</p> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAxIOKIpyAxCgogIDHigL8wIOKIpyAx4oC/MQ==">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>β§</span> <span class='Number'>1</span> +1 + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>0</span> <span class='Function'>β§</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>1</span> +β¨ 1 0 β© +</pre> diff --git a/docs/help/squareroot_root.html b/docs/help/squareroot_root.html new file mode 100644 index 00000000..94883873 --- /dev/null +++ b/docs/help/squareroot_root.html @@ -0,0 +1,21 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Root (`β`)</title> +</head> +<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="root-"><a class="header" href="#root-">Root (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--square-root--"><a class="header" href="#--square-root--"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Square root</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICDiiJogMg==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>2</span> +1.414213562373095 +</pre> +<h2 id="---root"><a class="header" href="#---root"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Root</a></h2> +<h2 id="th-root-of-"><a class="header" href="#th-root-of-"><code><span class='Value'>π¨</span></code>th root of <code><span class='Value'>π©</span></code>.</a></h2> +<p><a href="https://mlochbaum.github.io/BQN/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=ICAyIOKImiAyCgogIDHigL8y4oC/M+KAvzQg4oiaIDQgIA==">βοΈ</a><pre> <span class='Number'>2</span> <span class='Function'>β</span> <span class='Number'>2</span> +1.414213562373095 + + <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>β</span> <span class='Number'>4</span> +β¨ 4 2 1.587401051968199 1.414213562373095 β© +</pre> diff --git a/docs/help/suffixes_drop.html b/docs/help/suffixes_drop.html new file mode 100644 index 00000000..c581087c --- /dev/null +++ b/docs/help/suffixes_drop.html @@ -0,0 +1,45 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Down Arrow (`β`)</title> +</head> +<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="down-arrow-"><a class="header" href="#down-arrow-">Down Arrow (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--suffixes"><a class="header" href="#--suffixes"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Suffixes</a></h2> +<p>Suffixes of array <code><span class='Value'>π©</span></code> along its first axis.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oaTIDHigL8y4oC/M+KAvzQKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICDihpMgYQ==">βοΈ</a><pre> <span class='Function'>β</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> +β¨ β¨ 1 2 3 4 β© β¨ 2 3 4 β© β¨ 3 4 β© β¨ 4 β© β¨β© β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +ββ +Β· ββ ββ ββ β0βΏ3 + β΅ 0 1 2 β΅ 3 4 5 β΅ 6 7 8 + 3 4 5 6 7 8 β + 6 7 8 β + β + β +</pre> +<h2 id="---drop"><a class="header" href="#---drop"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Drop</a></h2> +<p>For each integer in <code><span class='Value'>π¨</span></code>, drop that many elements from the beginning of each dimension of <code><span class='Value'>π©</span></code>.</p> +<p>Negative numbers drop from the end.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMyDihpMgMeKAvzPigL814oC/NjcKCiAgIGEg4oaQIDTigL80IOKliiDihpUxNgoKICAgM+KAvzMg4oaTIGEKCiAgIDXigL81IOKGkyBhCgoKICAgM+KAv8KvMyDihpMgYQ==">βοΈ</a><pre> <span class='Number'>3</span> <span class='Function'>β</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>67</span> +β¨ 67 β© + + <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>16</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +ββ + + <span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>5</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +ββ + + + <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>Β―3</span> <span class='Function'>β</span> <span class='Value'>a</span> +ββ +ββ +</pre> diff --git a/docs/help/table.html b/docs/help/table.html new file mode 100644 index 00000000..cc52c41a --- /dev/null +++ b/docs/help/table.html @@ -0,0 +1,24 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Top Left Corner (`β`)</title> +</head> +<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="top-left-corner-"><a class="header" href="#top-left-corner-">Top Left Corner (<code><span class='Modifier'>β</span></code>)</a></h1> +<h2 id="---each"><a class="header" href="#---each"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>β</span> <span class='Value'>π©</span></code>: Each</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> between every possible pair of the elements of the arguments.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMeKAvzLigL8z4oC/NCAr4oycIDTigL814oC/NuKAvzcKCiAgICJhYmMiIOKIvuKMnCAieHl6Ig==">βοΈ</a><pre> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>+</span><span class='Modifier'>β</span> <span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span><span class='Ligature'>βΏ</span><span class='Number'>7</span> +ββ +β΅ 5 6 7 8 + 6 7 8 9 + 7 8 9 10 + 8 9 10 11 + β + + <span class='String'>"abc"</span> <span class='Function'>βΎ</span><span class='Modifier'>β</span> <span class='String'>"xyz"</span> +ββ +β΅ "ax" "ay" "az" + "bx" "by" "bz" + "cx" "cy" "cz" + β +</pre> diff --git a/docs/help/transpose_dyadtranspose.html b/docs/help/transpose_dyadtranspose.html new file mode 100644 index 00000000..2d42e13a --- /dev/null +++ b/docs/help/transpose_dyadtranspose.html @@ -0,0 +1,31 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle Backslash (`β`)</title> +</head> +<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="circle-backslash-"><a class="header" href="#circle-backslash-">Circle Backslash (<code><span class='Function'>β</span></code>)</a></h1> +<h2 id="--transpose-"><a class="header" href="#--transpose-"><code><span class='Function'>β</span> <span class='Value'>π©</span></code>: Transpose</a></h2> +<p>Move the first axis of <code><span class='Value'>π©</span></code> to the end.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCiAgIOKNiSBhCgogICBiIOKGkCAx4oC/MuKAvzMg4qWKIOKGlTYKCiAgIOKJouKNiSBi">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>9</span> + + <span class='Function'>β</span> <span class='Value'>a</span> +ββ +β΅ 0 3 6 + 1 4 7 + 2 5 8 + β + + <span class='Value'>b</span> <span class='Gets'>β</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> <span class='Function'>β₯</span> <span class='Function'>β</span><span class='Number'>6</span> + + <span class='Function'>β’β</span> <span class='Value'>b</span> +β¨ 2 3 1 β© +</pre> +<h2 id="---dyad"><a class="header" href="#---dyad"><code><span class='Value'>π¨</span> <span class='Function'>β</span> <span class='Value'>π©</span></code>: Dyad</a></h2> +<p>Rearrange the axes of <code><span class='Value'>π©</span></code> as per the axis indices 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=ICAg4omiIGEg4oaQIDLigL8z4oC/NOKAvzXigL82IOKlijEKCiAgIOKJoiAx4oC/M+KAvzLigL8w4oC/NCDijYkgYQ==">βοΈ</a><pre> <span class='Function'>β’</span> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>4</span><span class='Ligature'>βΏ</span><span class='Number'>5</span><span class='Ligature'>βΏ</span><span class='Number'>6</span> <span class='Function'>β₯</span><span class='Number'>1</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Function'>β’</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>3</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>0</span><span class='Ligature'>βΏ</span><span class='Number'>4</span> <span class='Function'>β</span> <span class='Value'>a</span> +<span class='Error'>Error: π¨βπ©: Length of π¨ must not exceed rank of π©</span> +</pre> diff --git a/docs/help/under.html b/docs/help/under.html new file mode 100644 index 00000000..eb83dd3e --- /dev/null +++ b/docs/help/under.html @@ -0,0 +1,25 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circle Jot (`βΎ`)</title> +</head> +<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="circle-jot-"><a class="header" href="#circle-jot-">Circle Jot (<code><span class='Modifier2'>βΎ</span></code>)</a></h1> +<h2 id="-----under"><a class="header" href="#-----under"><code><span class='Function'>π½</span><span class='Modifier2'>βΎ</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>βΎ</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Under</a></h2> +<ul> +<li>Apply transformation <code><span class='Function'>πΎ</span></code> to all arguments</li> +<li>Apply <code><span class='Function'>π½</span></code> to the transformed arguments</li> +<li>Undo transformation <code><span class='Function'>πΎ</span></code></li> +</ul> +<p>Where <code><span class='Function'>πΎ</span></code> must be</p> +<p>1. A function invertible by <code><span class='Modifier'>βΌ</span></code> (Undo) +2. A structural modification</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgOeKMvigx4oq44oqRKSAx4oC/MuKAvzMKCiAgIOKImuKBvCAo4oiaMSkgKyAo4oiaOSkKCiAgIDEgK+KMvuKImiA5">βοΈ</a><pre> <span class='Number'>9</span><span class='Modifier2'>βΎ</span><span class='Paren'>(</span><span class='Number'>1</span><span class='Modifier2'>βΈ</span><span class='Function'>β</span><span class='Paren'>)</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 9 3 β© + + <span class='Function'>β</span><span class='Modifier'>βΌ</span> <span class='Paren'>(</span><span class='Function'>β</span><span class='Number'>1</span><span class='Paren'>)</span> <span class='Function'>+</span> <span class='Paren'>(</span><span class='Function'>β</span><span class='Number'>9</span><span class='Paren'>)</span> +16 + + <span class='Number'>1</span> <span class='Function'>+</span><span class='Modifier2'>βΎ</span><span class='Function'>β</span> <span class='Number'>9</span> +16 +</pre> diff --git a/docs/help/undo.html b/docs/help/undo.html new file mode 100644 index 00000000..f9e3b9d1 --- /dev/null +++ b/docs/help/undo.html @@ -0,0 +1,27 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Superscript Equals Sign (`βΌ`)</title> +</head> +<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="superscript-equals-sign-"><a class="header" href="#superscript-equals-sign-">Superscript Equals Sign (<code><span class='Modifier'>βΌ</span></code>)</a></h1> +<h2 id="-----undo"><a class="header" href="#-----undo"><code><span class='Function'>π½</span><span class='Modifier'>βΌ</span> <span class='Value'>π©</span></code>, <code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier'>βΌ</span> <span class='Value'>π©</span></code>: Undo</a></h2> +<p>Invert the function <code><span class='Function'>π½</span></code>, or use its defined inverse. Not all functions have inverses.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMSAtIDIKCiAgIDEgLeKBvCAyCgogICDiiJogMTYKCiAgIOKImuKBvCA0CgogICDii4YgMQoKICAg4ouG4oG8IDIuNzE4MjgxODI4NDU5MDQ1">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>-</span> <span class='Number'>2</span> +Β―1 + + <span class='Number'>1</span> <span class='Function'>-</span><span class='Modifier'>βΌ</span> <span class='Number'>2</span> +Β―1 + + <span class='Function'>β</span> <span class='Number'>16</span> +4 + + <span class='Function'>β</span><span class='Modifier'>βΌ</span> <span class='Number'>4</span> +16 + + <span class='Function'>β</span> <span class='Number'>1</span> +2.718281828459045 + + <span class='Function'>β</span><span class='Modifier'>βΌ</span> <span class='Number'>2.718281828459045</span> +1 +</pre> diff --git a/docs/help/valences.html b/docs/help/valences.html new file mode 100644 index 00000000..bca22e88 --- /dev/null +++ b/docs/help/valences.html @@ -0,0 +1,23 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Circled Division Slash (`β`)</title> +</head> +<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-division-slash-"><a class="header" href="#circled-division-slash-">Circled Division Slash (<code><span class='Modifier2'>β</span></code>)</a></h1> +<h2 id="--valences"><a class="header" href="#--valences"><code><span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Valences</a></h2> +<p>Apply <code><span class='Function'>π½</span></code> to <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=ICAgK+KKmC0gNQoKICAgLeKKmCsgNQ==">βοΈ</a><pre> <span class='Function'>+</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>5</span> +5 + + <span class='Function'>-</span><span class='Modifier2'>β</span><span class='Function'>+</span> <span class='Number'>5</span> +Β―5 +</pre> +<h2 id="---valences"><a class="header" href="#---valences"><code><span class='Value'>π¨</span> <span class='Function'>π½</span><span class='Modifier2'>β</span><span class='Function'>πΎ</span> <span class='Value'>π©</span></code>: Valences</a></h2> +<p>Apply <code><span class='Function'>πΎ</span></code> to <code><span class='Value'>π¨</span></code> and <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=ICAgNCAr4oqYLSA1CgogICA0IC3iipgrIDU=">βοΈ</a><pre> <span class='Number'>4</span> <span class='Function'>+</span><span class='Modifier2'>β</span><span class='Function'>-</span> <span class='Number'>5</span> +Β―1 + + <span class='Number'>4</span> <span class='Function'>-</span><span class='Modifier2'>β</span><span class='Function'>+</span> <span class='Number'>5</span> +9 +</pre> diff --git a/help/abs_modulus.md b/help/abs_modulus.md new file mode 100644 index 00000000..1e015d37 --- /dev/null +++ b/help/abs_modulus.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/abs_modulus.html).* + +# Pipe (`|`) + +## `| π©`: Absolute Value + +Absolute Value of `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + | Β―2 + + | 1βΏ3βΏΒ―4βΏ3 + + + +## `π¨ | π©`: Modulus + +Remainder of `π©` divided by `π¨`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 | 3 + + 2 | 3βΏ4βΏ5 + + diff --git a/help/after_bindright.md b/help/after_bindright.md new file mode 100644 index 00000000..e8cb2bcb --- /dev/null +++ b/help/after_bindright.md @@ -0,0 +1,43 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/after_bindright.html).* + +# Left Multimap (`β`) + +## `π½βπ π©`: Bind + +Supply `π` as a right argument to `π½` (`π© π½ π`). + +## `π` must be a value, `F` must be dyadic. + + -β3 9 + + - 3 9 + + 9 - 3 + + + +## `π½βπΎ π©`: After + +Apply `πΎ` to `π©`, and supply it as a right argument to `π½` (`π© π½ (πΎ π©)`). + +`π½` must be dyadic, `πΎ` must be monadic. + + Γβ- 9 + + Γ - 9 + + 9 Γ (- 9) + + + +## `π¨ π½βπΎ π©`: Dyadic After + +Apply `πΎ` to `π©`, and supply it as a right argument to `π½` (`π¨ π½ (πΎ π©)`). + +`π½` must be dyadic, `πΎ` must be monadic. + + 2 Γβ- 1 + + 2 Γ (- 1) + + diff --git a/help/assert_assertwithmsg.md b/help/assert_assertwithmsg.md new file mode 100644 index 00000000..4a7e26cf --- /dev/null +++ b/help/assert_assertwithmsg.md @@ -0,0 +1,29 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/assert_assertwithmsg.html).* + +# Exclamation Mark (`!`) + +## `! π©`: Assert + +Throw an error if `π©` is not 1. + + ! 1 + + ! 2 + + ! "hello" + + + + +## `π¨ ! π©`: Dyad + +Throw an error with message `π¨` if `π©` is not 1. + + "hi" ! 1 + + "two" ! 2 + + "hello error" ! "hello" + + + diff --git a/help/atop.md b/help/atop.md new file mode 100644 index 00000000..525c4800 --- /dev/null +++ b/help/atop.md @@ -0,0 +1,29 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/atop.html).* + +# Ring Operator (`β`) + +## `π½βπΎ π©`: Atop + +Apply `πΎ` to `π©`, then apply `π½` (`π½ πΎ π©`). + +`π½` and `πΎ` must be monadic. + + -β- 5 + + - - 5 + + + +## `π¨ π½βπΎ π©`: Dyadic Atop + +Apply `πΎ` to `π¨` and `π©`, then apply `π½` (`π½ (π¨ πΎ π©)`). + +#`π½` must be monadic, and `πΎ` must be dyadic. + + 1 -β+ 2 + + 1 - + 2 + + - 1 + 2 + + diff --git a/help/before_bindleft.md b/help/before_bindleft.md new file mode 100644 index 00000000..eeeb1fcf --- /dev/null +++ b/help/before_bindleft.md @@ -0,0 +1,43 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/before_bindleft.html).* + +# Multimap (`βΈ`) + +## `πβΈπΎ π©`: Bind Left + +Supply `π` as a left argument to `πΎ` (`π πΎ π©`). + +## `π` must be a value, `πΎ` must be dyadic. + + 3βΈ- 9 + + 3 - 9 + + + +## `π½βΈπΎ π©`: Before + +Apply `π½` to `π©`, and supply it as a left argument to `πΎ` (`(π½ π©) πΎ π©`). + +`π½` must be monadic, `πΎ` must be dyadic. + + -βΈ+ 9 + + - + 9 + + (- 9) + 9 + + + +## `π¨ π½βΈπΎ π©`: Dyadic Before + +Apply `π½` to `π¨`, and supply it as a left argument to `πΎ` (`(π½ π¨) πΎ π©`). + +`π½` must be monadic, `πΎ` must be dyadic. + + 2 -βΈ+ 1 + + 2 - + 1 + + (- 2) + 1 + + diff --git a/help/catch.md b/help/catch.md new file mode 100644 index 00000000..5f1b3087 --- /dev/null +++ b/help/catch.md @@ -0,0 +1,17 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/catch.html).* + +# Circled Triangle Down (`β`) + +## `π½βπΎ π©`, `π¨ π½βπΎ π©`: Catch + +Apply `π½` to the arguments. + +If an error happens when `π½` is applied, cancel its execution, apply `πΎ` to the arguments and return the results. + +Otherwise, return the results of `π½`. + + βΎβ{"error occurred with argument: "βΎβ’Fmt π©} 1 + + βΎβ{"error occurred with argument: "βΎβ’Fmt π©} β¨β¨1,2β©, β¨3,4β©β© + + diff --git a/help/ceiling_maximum.md b/help/ceiling_maximum.md new file mode 100644 index 00000000..a0ac5282 --- /dev/null +++ b/help/ceiling_maximum.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/ceiling_maximum.html).* + +# Left Ceiling (`β`) + +## `β π©`: Ceiling + +Round `π©` up. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + β 1.2βΏΟβΏ3βΏ7.89 + + + +## `π¨ β π©`: Maximum + +Maximum of `π¨` and `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β 2 + + 2βΏ3 β 4βΏ2 + + diff --git a/help/cells.md b/help/cells.md new file mode 100644 index 00000000..6f21a19f --- /dev/null +++ b/help/cells.md @@ -0,0 +1,17 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/cells.html).* + +# Breve (`Λ`) + +## `π½Λ π©`, `π¨ π½Λ π©`: Cells + +Apply `π½` to/between the major cells of the arguments. (`π½βΒ―1`) + + a β 3βΏ3 β₯ β9 + + + <Λ a + + a βΛ a + + + diff --git a/help/choose.md b/help/choose.md new file mode 100644 index 00000000..c6af346b --- /dev/null +++ b/help/choose.md @@ -0,0 +1,19 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/choose.html).* + +# Circle with Lower Right Quadrant (`βΆ`) + +## `π½βΆπ π©`, `π¨ π½βΆπ π©`: Choose + +Apply `π½` to the arguments and pick a function from list `π`. Apply the picked function to the arguments. + + F β β’βΆ+βΏ-βΏΓ·βΏΓ + + F 0 + + F 1 + + F 2 + + F 3 + + diff --git a/help/classify_indexof.md b/help/classify_indexof.md new file mode 100644 index 00000000..0aa3b0d6 --- /dev/null +++ b/help/classify_indexof.md @@ -0,0 +1,30 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/classify_indexof.html).* + +# Square Original Of (`β`) + +## `β π©`: Classify + +First index of each major cell of `π©` in `π©`. + + β 5βΏ6βΏ2βΏ2βΏ5βΏ1 + + a β 3βΏ3 β₯ 0βΏ1βΏ2βΏ9βΏ0βΏ9βΏ0βΏ1βΏ2 + + β a + + + +## `π¨ β π©`: Index Of + +First index of each major cell of `π©` in `π¨`. Rank of `π©` must be at least cell rank of π¨`. + +If a cell is not found in `π¨`, that position will contain the length of `π¨` (`β π¨`). + + 5βΏ6βΏ2βΏ2βΏ5βΏ1 β 5βΏ2βΏ1βΏ6 + + a β 3βΏ3 β₯ 0βΏ1βΏ2βΏ9βΏ0βΏ9βΏ0βΏ1βΏ2 + + a β β¨9βΏ0βΏ9β© + + + diff --git a/help/conjugate_add.md b/help/conjugate_add.md new file mode 100644 index 00000000..5ac05396 --- /dev/null +++ b/help/conjugate_add.md @@ -0,0 +1,24 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/conjugate_add.html).* + +# Plus (`+`) + +## `+ π©`: Conjugate + + + 1 + + + Β―1 + + +## `π¨ + π©`: Add + +`π¨` added to `π©`. Either `π¨` or `π©` can be a character, and if so, the other has to be an integer. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 + 2 + + 1 + 2βΏ3βΏ4 + + 'a' + 4 + + diff --git a/help/constant.md b/help/constant.md new file mode 100644 index 00000000..0939831c --- /dev/null +++ b/help/constant.md @@ -0,0 +1,13 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/constant.html).* + +# Dot Above (`Λ`) + +## `π½Λ π©`, `π¨ π½Λ π©`: Constant + +Returns a function that will always return `π`. + + "hello" (1 Λ) 2 + + "hello" ({π¨+π©} Λ) 2 + + diff --git a/help/deduplicate_find.md b/help/deduplicate_find.md new file mode 100644 index 00000000..631638c4 --- /dev/null +++ b/help/deduplicate_find.md @@ -0,0 +1,33 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/deduplicate_find.html).* + +# Epsilon Underbar (`β·`) + +## `β· π©`: Deduplicate + +Unique major cells of `π©`. + + β· 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + a β 3βΏ3 β₯ β6 + + β· a + + + +## `π¨ β· π©`: Find + +Mark the top left location of the occurrences of `π¨` in `π©` with a 1, and other locations with 0. + +Result is the same shape as `(β’π¨)βx`. + + "string" β· "substring" + + "loooooong" β· "short" + + a β 7 (4|βΛ)βββ 9 + + b β (0βΏ3βΏ0β0βΏ1βΏ0) + + b β· a + + diff --git a/help/depth.md b/help/depth.md new file mode 100644 index 00000000..45be27e8 --- /dev/null +++ b/help/depth.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/depth.html).* + +# Circle With Two Dots (`β`) + +## `π½βπ π©`, `π¨ π½βπ π©`: Depth + +Apply `π½` to the cells of the arguments at depth given in `π`. + + + 1βΈββ1 β¨β¨1,2,3β©, β¨4,5,6β©β© + + 1 ββ1 β¨β¨1,2,3β©, β¨4,5,6β©β© + + diff --git a/help/depth_match.md b/help/depth_match.md new file mode 100644 index 00000000..99c9dfdf --- /dev/null +++ b/help/depth_match.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/depth_match.html).* + +# Identical To (`β‘`) + +## `β‘ π©`: Depth + +Highest level of nesting in `π©`. + + β‘ 2βΏ3βΏ4 + + β‘ β¨2,<3,4,<<<5β© + + β‘ 9 + + + +## `π¨ β‘ π©`: Match + +Does `π¨` exactly match `π©`? + + 1 β‘ β¨1β© + + β¨1β© β‘ β¨1β© + + diff --git a/help/deshape_reshape.md b/help/deshape_reshape.md new file mode 100644 index 00000000..98e930b3 --- /dev/null +++ b/help/deshape_reshape.md @@ -0,0 +1,31 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/deshape_reshape.html).* + +# Barb (`β₯`) + +## `β₯ π©`: Deshape + +Put all elements of `π©` in a rank 1 array, converting to array if necessary. + + β₯ 1 + + β₯ 1βΏ2 β 3βΏ4 + + + +## `π¨ β₯ π©`: Reshape + +Put all elements of `π©` in an array of shape `π¨`, adding or removing elements if necessary. + +A single element in `π©` can be a function, which will be replaced with an appropriate length: +- `β` Exact fit +- `β` Round length down, discarding elements +- `β½` Round length up +- `β` Round length up, and use element fill to add extra elements. + + 3βΏ3 β₯ 3 + + 2βΏβ½βΏ2 β₯ 1βΏ2βΏ3 + + 2βΏββΏ2 β₯ 1βΏ2βΏ3 + + diff --git a/help/each.md b/help/each.md new file mode 100644 index 00000000..a34392c6 --- /dev/null +++ b/help/each.md @@ -0,0 +1,13 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/each.html).* + +# Diaresis (`Β¨`) + +## `π½Β¨ π©`, `π¨ π½Β¨ π©`: Each + +Apply `π½` to/between the major elements of the arguments. (`π½βΒ―1`) + + <Β¨ 1βΏ2βΏ3 + + 4βΏ5βΏ6 βΎΒ¨ 1βΏ2βΏ3 + + diff --git a/help/enclose_less.md b/help/enclose_less.md new file mode 100644 index 00000000..1f743fd9 --- /dev/null +++ b/help/enclose_less.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/enclose_less.html).* + +# Lesser Than (`<`) + +## `< π©`: Enclose + +Create a unit array containing `π©`. (`(β’π©) β‘ β¨β©`) + + + <1 + + + β’<1 + + + +## `π¨ < π©`: Lesser Than + +`π¨` and `π©` can both be either numbers or characters. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 < 3 + + 2βΏ3βΏ0 < 3βΏ1βΏ0 + + diff --git a/help/enlist_pair.md b/help/enlist_pair.md new file mode 100644 index 00000000..88168860 --- /dev/null +++ b/help/enlist_pair.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/enlist_pair.html).* + +# Bow Tie (`β`) + +## `β π©`: Enlist + +Put `π©` in a single element list. (`β¨π©β©`) + + β 1 + + β 4βΏ4 β₯ 3βΏ67βΏ8βΏ0 + + + +## `π¨ β π©`: Pair + +Put `π¨` and `π©` in a two element list. (`β¨π¨, π©β©`) + + 1 β 2 + + 1 β "dsdasdas" + + (3βΏ3 β₯ 3) β 67βΏ'a'βΏ"example" + + diff --git a/help/exponential_power.md b/help/exponential_power.md new file mode 100644 index 00000000..891dba08 --- /dev/null +++ b/help/exponential_power.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/exponential_power.html).* + +# Star (`β`) + +## `β π©`: Exponential + +`e` (Euler's constant) to the power of `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + β 0βΏ1βΏ2βΏ3 + + + +## `π¨ β π©`: Power + +`π¨` to the power of `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 2 β 5 + + 8βΏ5βΏ9 β 2 + + 2βΏ3 β 3βΏΒ―4 + + diff --git a/help/first_pick.md b/help/first_pick.md new file mode 100644 index 00000000..c415b8f9 --- /dev/null +++ b/help/first_pick.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/first_pick.html).* + +# Square Image Of Or Equal To (`β`) + +## `β π©`: First + +First element of `π©`. + + β β¨1, 2, 3β© + + a β 3βΏ3 β₯ β9 + + β a + + + +## `π¨ β π©`: Pick + +Pick the element of `π¨` at index `π©`. + + 2 β β¨1, 2, 3β© + + a β 3βΏ3 β₯ β9 + + 2βΏ0 β a + + diff --git a/help/firstcell_select.md b/help/firstcell_select.md new file mode 100644 index 00000000..94c82357 --- /dev/null +++ b/help/firstcell_select.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/firstcell_select.html).* + +# Square Image Of (`β`) + +## `β π©`: First Cell + +First major cell of `π©`. + + β β¨1, 2, 3β© + + a β 3βΏ3 β₯ β9 + + β a + + + +## `π¨ β π©`: Select + +Select the major cells of `π¨` at the indices in `π©`. + + 2βΏ0 β β¨1, 2, 3β© + + a β 3βΏ3 β₯ β9 + + 2βΏ0 β a + + diff --git a/help/floor_minimum.md b/help/floor_minimum.md new file mode 100644 index 00000000..95bb5976 --- /dev/null +++ b/help/floor_minimum.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/floor_minimum.html).* + +# Left Floor (`β`) + +## `β π©`: Floor + +Round `π©` down. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + β 1.2βΏΟβΏ3βΏ7.89 + + + +## `π¨ β π©`: Minimum + +Minimum of `π¨` and `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β 2 + + 2βΏ3 β 4βΏ2 + + diff --git a/help/fold.md b/help/fold.md new file mode 100644 index 00000000..3684d96c --- /dev/null +++ b/help/fold.md @@ -0,0 +1,30 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/fold.html).* + +# Acute Accent (`Β΄`) + +## `π½Β΄ π©`: Fold + +Fold over `π©` with `π½` from right to left i.e. Insert `π½` between the elements of `π©`. + + +Β΄ 1βΏ2βΏ3 + + 1+2+3 + + -Β΄ 1βΏ2βΏ3 + + 1-2-3 + + +## `π¨ π½Β΄ π©`: Fold With initial + +Monadic fold, but use `π¨` as initial right argument. + + 5 +Β΄ 1βΏ2βΏ3 + + 1+2+3+5 + + 5 -Β΄ 1βΏ2βΏ3 + + 1-2-3-5 + + diff --git a/help/gradedown_binsdown.md b/help/gradedown_binsdown.md new file mode 100644 index 00000000..f3906c00 --- /dev/null +++ b/help/gradedown_binsdown.md @@ -0,0 +1,29 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/gradedown_binsdown.html).* + +# Del Stile (`β`) + +## `β π©`: Grade Down + +Indices of `π©` that would sort its major cells in descending order. + + a β 1βΏ2βΏ3 + + β a + + (βa) β a + + + +## `π¨ β π©`: Bins Down + +Binary search for each element of `π©` in `π¨`, and return the index found, if any. + +`π¨` must be sorted in descending order. + +[Right Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 7βΏ5βΏ4βΏ3 β 2 + + 7βΏ5βΏ4βΏ3 β 2βΏ6 + + diff --git a/help/gradeup_binsup.md b/help/gradeup_binsup.md new file mode 100644 index 00000000..7a73116d --- /dev/null +++ b/help/gradeup_binsup.md @@ -0,0 +1,28 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/gradeup_binsup.html).* + +# Delta Stile (`β`) + +## `β π©`: Grade Up + +Indices of `π©` that would sort its major cells in ascending order. + + a β 3βΏ2βΏ1 + + β a + + (βa) β a + + + + +## `π¨ β π©`: Bins Up + +Binary search for each element of `π©` in `π¨`, and return the index found, if any. + +`π¨` must be sorted in ascending order. + + 3βΏ4βΏ5βΏ7 β 2 + + 3βΏ4βΏ5βΏ7 β 2βΏ6 + + diff --git a/help/greatequal.md b/help/greatequal.md new file mode 100644 index 00000000..1772cbaf --- /dev/null +++ b/help/greatequal.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/greatequal.html).* + +# Greater Than or Equal To (`β₯`) + +## `π¨ β₯ π©`: Greater Than or Equal To + +`π¨` and `π©` can both be either numbers or characters. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β₯ 3 + + 2βΏ3βΏ0 β₯ 3βΏ1βΏ0 + + diff --git a/help/groupindices_group.md b/help/groupindices_group.md new file mode 100644 index 00000000..ee0e9762 --- /dev/null +++ b/help/groupindices_group.md @@ -0,0 +1,31 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/groupindices_group.html).* + +# Square Cup (`β`) + +## `β π©`: Group Indices + +Group the indices of the major cells of `π©` by their respective values. + +## `π©` must consist of integers. Groups start from 0. + + β 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + (β8) β β 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + + +## `π¨ β π©`: Group + +Group the major cells of `π©` by their respective indices in `π¨`. + +If an element corresponds to `Β―1`, it is excluded from grouping. + +An extra element can be added to the end of `π¨` to specify length of the result. + + 1βΏ0βΏ1βΏ2βΏ2βΏ3βΏ3 β 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + 1βΏ0βΏ1βΏΒ―1βΏΒ―1βΏ3βΏ3 β 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + 1βΏ0βΏ1βΏΒ―1βΏΒ―1βΏ3βΏ3βΏ10 β 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + diff --git a/help/identity_left.md b/help/identity_left.md new file mode 100644 index 00000000..dabe6cc7 --- /dev/null +++ b/help/identity_left.md @@ -0,0 +1,21 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/identity_left.html).* + +# Left Tack (`β£`) + +## `β£ π©`: + +Return `π©`. + + β£ 5 + + + +## `π¨ β£ π©`: Left + +Return `π¨`. + + 5 β£ 8 + + 'a' β£ 1βΏ2βΏ3 + + diff --git a/help/identity_right.md b/help/identity_right.md new file mode 100644 index 00000000..a0844a8f --- /dev/null +++ b/help/identity_right.md @@ -0,0 +1,21 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/identity_right.html).* + +# Right Tack (`β’`) + +## `β’ π©`: + +Return `π©`. + + β’ 5 + + + +## `π¨ β’ π©`: Right + +Return `π©`. + + 5 β’ 8 + + 'a' β’ 1βΏ2βΏ3 + + diff --git a/help/indices_replicate.md b/help/indices_replicate.md new file mode 100644 index 00000000..9ffad842 --- /dev/null +++ b/help/indices_replicate.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/indices_replicate.html).* + +# Solidus (`/`) + +## `/ π©`: Indices + +Repeat the index of each element in `π©` by the element's value. `π©` must be rank 1. + + / 1βΏ2βΏ3 + + / 1βΏ0βΏ1 + + + +## `π¨ / π©`: Replicate + +Repeat each major cell in `π©` by the corresponding element in `π¨`. + +Atomic `π¨` applies to all elements. + + 3 / "copy" + + 1βΏ0βΏ1 / 1βΏ2βΏ3 + + diff --git a/help/join_jointo.md b/help/join_jointo.md new file mode 100644 index 00000000..13419744 --- /dev/null +++ b/help/join_jointo.md @@ -0,0 +1,31 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/join_jointo.html).* + +# Lazy S (`βΎ`) + +## `βΎ π©`: Join + +Join all elements of `π©` together. + +Element ranks must be compatible. + + βΎ β¨1βΏ2, 3, 4βΏ5β© + + m β (3βΏ1ββ4βΏ2βΏ5) β₯Β¨ 2βΏ3β₯β6 + + βΎ m + + + +## `π¨ βΎ π©`: Join + +Join `π¨` to `π©` along the first axis. + + "abcd" βΎ "EFG" + + a β 3βΏ3 β₯ β9 + + c β 4βΏ3 β₯ β12 + + aβΎc + + diff --git a/help/length_notequal.md b/help/length_notequal.md new file mode 100644 index 00000000..057247c9 --- /dev/null +++ b/help/length_notequal.md @@ -0,0 +1,32 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/length_notequal.html).* + +# Not Equal (`β `) + +## `β π©`: Length + +Length of the first dimension of `π©`. + + + β 3 + + β β¨1, 2, 3β© + + β 3βΏ4βΏ5β₯0 + + β 1βΏ4βΏ5β₯0 + + β 4βΏ4βΏ5β₯0 + + + +## `π¨ β π©`: Not Equal To + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β 3 + + 2βΏ3βΏ0 β 3βΏ1βΏ0 + + 'a' β 'a' + + diff --git a/help/lessequal.md b/help/lessequal.md new file mode 100644 index 00000000..8fc0000b --- /dev/null +++ b/help/lessequal.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/lessequal.html).* + +# Lesser Than or Equal To (`β€`) + +## `π¨ β€ π©`: Lesser Than or Equal To + +`π¨` and `π©` can both be either numbers or characters. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β€ 3 + + 2βΏ3βΏ0 β€ 3βΏ1βΏ0 + + diff --git a/help/markfirst_memberof.md b/help/markfirst_memberof.md new file mode 100644 index 00000000..228d6a50 --- /dev/null +++ b/help/markfirst_memberof.md @@ -0,0 +1,29 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/markfirst_memberof.html).* + +# Element Of (`β`) + +## `β π©`: Unique Mask + +Mark the first occurrence of each major cell in `π©` with a 1, and all other occurrences with a 0. + + β 4βΏ5βΏ6βΏ6βΏ4βΏ7βΏ5 + + a β 3βΏ3 β₯ β9 + + β a + + + +## `π¨ β π©`: Member Of + +Is each element in `π¨` a major cell of `π©`? + + β¨1β© β β9 + + a β 3βΏ3 β₯ β9 + + β¨0βΏ1βΏ2β© β a + + β¨1βΏ3 β₯ 0βΏ1βΏ2β© β a + + diff --git a/help/merge_great.md b/help/merge_great.md new file mode 100644 index 00000000..c91b3b8b --- /dev/null +++ b/help/merge_great.md @@ -0,0 +1,37 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/merge_great.html).* + +# Greater Than (`>`) + +## `> π©`: Merge + +Add the rank of an element of `π©` to the rank of `π©`. + +All elements must have the same rank. + +Returns atomic values as is. + + + a β β¨β¨1, 2β©, β¨3, 4β©β© + + >a + + β’a + + β’>a + + + + +## `π¨ > π©`: Greater Than + +`π¨` and `π©` can both be either numbers or characters. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 > 3 + + 2βΏ3βΏ0 > 3βΏ1βΏ0 + + 'a' > 'b' + + diff --git a/help/negate_subtract.md b/help/negate_subtract.md new file mode 100644 index 00000000..8a70e1bf --- /dev/null +++ b/help/negate_subtract.md @@ -0,0 +1,30 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/negate_subtract.html).* + +# Minus (`-`) + +## `- π©`: Negate + +Additive Inverse of `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + - 1 + + - Β―1 + + +## `π¨ - π©`: Subtract + +Subtract `π©` from `π¨`. `π¨` and `π©` can be characters or integers. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 - 2 + + 1 - 2βΏ3βΏ4 + + 'a' - 4 + + 'b' - 'a' + + diff --git a/help/not_span.md b/help/not_span.md new file mode 100644 index 00000000..7b099699 --- /dev/null +++ b/help/not_span.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/not_span.html).* + +# Not (`Β¬`) + +## `Β¬ π©`: Logical Not + +Logical Not of `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + Β¬ 0 + + Β¬ 1βΏ0 + + + +## `π¨ Β¬ π©`: Span + +Count of numbers in the inclusive range from `π©` to `π¨`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 3 Β¬ 1 + + 3βΏ4 Β¬ 0βΏ2 + + diff --git a/help/occcount_progindex.md b/help/occcount_progindex.md new file mode 100644 index 00000000..649869c8 --- /dev/null +++ b/help/occcount_progindex.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/occcount_progindex.html).* + +# Square Original Of or Equal To (`β`) + +## `β π©`: Occurrence Count + +Number of times each major cell of `π©` appears before itself. + + β 2βΏ7βΏ1βΏ8βΏ1βΏ7βΏ1βΏ8βΏ2βΏ8βΏ4 + + βββ 2βΏ7βΏ1βΏ8βΏ1βΏ7βΏ1βΏ8βΏ2βΏ8βΏ4 + + + +## `π¨ β π©`: Progressive Index Of + +Index of the first unused match of each major cell of `π©` in `π¨`. If there are no more matches left, length of `π¨` is placed in that position. + + "aaa" β "aaaaa" + + "aaabb" β "ababababab" + + diff --git a/help/over.md b/help/over.md new file mode 100644 index 00000000..38795145 --- /dev/null +++ b/help/over.md @@ -0,0 +1,29 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/over.html).* + +# Circle (`β`) + +## `π½βπΎ π©`: Atop + +Apply `πΎ` to `π©`, then apply `π½` (`π½ πΎ π©`). + +`π½` and `πΎ` must be monadic. + + -β- 5 + + - - 5 + + + +## `π¨ π½βπΎ π©`: Over + +Apply `πΎ` to `π¨` and `π©`, then apply `π½` to them (`(πΎ π¨) π½ (πΎ π©)`). + +`π½` must be dyadic, `πΎ` must be monadic. + + 1 +β- 2 + + 1 + - 2 + + (- 1) + (- 2) + + diff --git a/help/prefixes_take.md b/help/prefixes_take.md new file mode 100644 index 00000000..636574fa --- /dev/null +++ b/help/prefixes_take.md @@ -0,0 +1,35 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/prefixes_take.html).* + +# Up Arrow (`β`) + +## `β π©`: Prefixes + +Prefixes of array `π©` along its first axis. + + β 1βΏ2βΏ3βΏ4 + + a β 3βΏ3 β₯ β9 + + β a + + + +## `π¨ β π©`: Take + +For each integer in `π¨`, take that many elements from each dimension of `π©`. + +Negative numbers take from the end. + +If any of the elements in `π¨` are greater than the length of their respective dimension, the dimension is extended with a fill value. + + 3 β 1βΏ3βΏ5βΏ67 + + a β 4βΏ4 β₯ β16 + + 3βΏ3 β a + + 5βΏ5 β a + + 3βΏΒ―3 β a + + diff --git a/help/range_windows.md b/help/range_windows.md new file mode 100644 index 00000000..d4f82a1c --- /dev/null +++ b/help/range_windows.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/range_windows.html).* + +# Up Down Arrow (`β`) + +## `β π©`: Range + +Return all indices to index into an array of shape `π©`, in the shape described by `π©`. + +When given a single number, range from 0 to `π©-1`. + + β 4 + + β 4βΏ5 + + + +## `π¨ β π©`: Windows + +Overlapping slices of `π©` which are of shape `π¨`. + + 5 β "abcdefg" + + a β 3βΏ3β₯β9 + + 2βΏ2 β a + + diff --git a/help/rank.md b/help/rank.md new file mode 100644 index 00000000..0bbab822 --- /dev/null +++ b/help/rank.md @@ -0,0 +1,20 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/rank.html).* + +# Circled Horizontal Bar With Notch (`β`) + +## `π½βπ π©`, `π¨ π½βπ π©`: Rank + +Apply `π½` to cells at ranks given in `π`. + +The ranks applied are given by the following: + +- `β c` Rank-c cells of `π©` (monadic) or both arguments (dyadic) +- `β bβΏc` β Rank-b cells of `π¨` and rank-c cells of `π©` (dyadic) +- `β aβΏbβΏc` β Rank-a cells of `π©` (monadic), b-cells of `π¨` and c-cells of `π©` (dyadic) + + + a β 3βΏ2βΏ4β₯"ABCDEFGHIJKLMNOPQRSTUVWXYZ" + + β½β2 a + + diff --git a/help/rank_equal.md b/help/rank_equal.md new file mode 100644 index 00000000..1663df7d --- /dev/null +++ b/help/rank_equal.md @@ -0,0 +1,30 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/rank_equal.html).* + +# Equal (`=`) + +## `= π©`: Rank + +Returns the number of dimensions in `π©`. + + + = 0 + + = 3β₯0 + + = 3βΏ3β₯0 + + 3βΏ3βΏ3 β₯ β¨β¨0β©β© + + + +## `π¨ = π©`: Equal To + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 = 3 + + 2βΏ3βΏ0 = 3βΏ1βΏ0 + + 'a' = 'a' + + diff --git a/help/reciprocal_divide.md b/help/reciprocal_divide.md new file mode 100644 index 00000000..c7d8374c --- /dev/null +++ b/help/reciprocal_divide.md @@ -0,0 +1,26 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/reciprocal_divide.html).* + +# Divide (`Γ·`) + +## `Γ· π©`: Reciprocal + +Gives `1 Γ· π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + Γ· 5 + + + +## `π¨ Γ· π©`: Divide + +`π¨` divided by `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 5 Γ· 4 + + 14 Γ· 7 + + + diff --git a/help/repeat.md b/help/repeat.md new file mode 100644 index 00000000..4a94ac57 --- /dev/null +++ b/help/repeat.md @@ -0,0 +1,17 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/repeat.html).* + +# Circle Star (`β`) + +## `π½βπΎ π©`, `π¨ π½βπΎ π©`: Repeat + +Apply `πΎ` to `π¨` and `π©` and apply `π½` to `π©` that may times. If `π¨` is given, keep it as a constant left argument. + +If `πΎ` returns an array, give `π½βπ©` for each element. + + 1 +ββ’ 4 + + 1 +β1βΏ2βΏ3 4 + + 3 βΎβ{β π©} β¨4,5,6β© + + diff --git a/help/reverse_rotate.md b/help/reverse_rotate.md new file mode 100644 index 00000000..a7ec430b --- /dev/null +++ b/help/reverse_rotate.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/reverse_rotate.html).* + +# Circle Stile (`β½`) + +## `β½ π©`: Reverse + +Reverse the first axis of `π©`. + + β½ 1βΏ2βΏ3 + + a β 3βΏ3 β₯ β9 + + β½ a + + + +## `π¨ β½ π©`: Dyad + +Move the first `π¨` elements of `π©` to its end. Negative `π¨` reverses the direction of rotation. + + 2 β½ 1βΏ2βΏ3 + + a β 3βΏ3 β₯ β9 + + 2 β½ a + + diff --git a/help/scan.md b/help/scan.md new file mode 100644 index 00000000..c2e92f67 --- /dev/null +++ b/help/scan.md @@ -0,0 +1,31 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/scan.html).* + +# Grave (`` ` ``) + +## ``π½` π©``: Fold + +Scan over `π©` with `π½` from left to right, producing intermediate values. + + + +` 1βΏ2βΏ3 + + β¨1, 1+2, (1+2)+3β© + + -` 1βΏ2βΏ3 + + β¨1, 1-2, (1-2)-3β© + + +## ``π¨ π½` π©``: Scan With initial + +Monadic scan, but use `π¨` as initial left argument. + + 5 +` 1βΏ2βΏ3 + + β¨5+1, (5+1)+2, ((5+1)+2)+3β© + + 5 -` 1βΏ2βΏ3 + + β¨5-1, (5-1)-2, ((5-1)-2)-3β© + + diff --git a/help/self_swap.md b/help/self_swap.md new file mode 100644 index 00000000..fdd4dcc8 --- /dev/null +++ b/help/self_swap.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/self_swap.html).* + +# Small Tilde (`Λ`) + +## `π½Λ π©`: Self + +Supplies `π©` as a left argument to `π½` (`π© π½ π©`). + + 1 + 1 + + +Λ 1 + + + +## `π¨ π½Λ π©`: Swap + +Swaps the arguments of `π½` (`π© π½ π¨`). + + 1 - 2 + + 1 -Λ 2 + + diff --git a/help/shape_notmatch.md b/help/shape_notmatch.md new file mode 100644 index 00000000..663d1d61 --- /dev/null +++ b/help/shape_notmatch.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/shape_notmatch.html).* + +# Not Identical To (`β’`) + +## `β’ π©`: Shape + +Length of each dimension of x. + + β’ 1 + + β’ 1βΏ2 + + β’ 1βΏ2 β 3βΏ4 + + + +## `π¨ β’ π©`: Not Match + +Does `π¨` not exactly match `π©`? + + 1 β’ β¨1β© + + β¨1β© β’ β¨1β© + + diff --git a/help/shiftafter.md b/help/shiftafter.md new file mode 100644 index 00000000..08e42a89 --- /dev/null +++ b/help/shiftafter.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/shiftafter.html).* + +# Right Pointing Double Angle Quotation (`Β»`) + +## `Β» π©`: Shift After + +Remove the last element of `π©`, add a cell of fill values to the start of the first axis of `π©`. + + Β» 1βΏ2βΏ3 + + Β» 3βΏ3 β₯ 9 + + + +## `π¨ Β» π©`: Shift After + +Remove the last `β π¨` (length) major cells from `π©`, join `π¨` to the start of `π©`. Ranks must match. + + 78 Β» 1βΏ2βΏ3 + + 1βΏ2 Β» 1βΏ2βΏ3 + + a β 3βΏ3 β₯ 9 + + 1βΏ2βΏ3 Β» a + + diff --git a/help/shiftbefore.md b/help/shiftbefore.md new file mode 100644 index 00000000..ca32833f --- /dev/null +++ b/help/shiftbefore.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/shiftbefore.html).* + +# Left Pointing Double Angle Quotation (`Β«`) + +## `Β« π©`: Shift Before + +Remove the first element of `π©`, add a cell of fill values to the end of the first axis of `π©`. + + 78 Β« 1βΏ2βΏ3 + + Β« 1βΏ2βΏ3 + + Β« 3βΏ3 β₯ 9 + + + +## `π¨ Β« π©`: Shift Before + +Remove the first `β π¨` (length) major cells from `π©`, join `π¨` to the end of `π©`. Ranks must match. + + 8βΏ5 Β« 1βΏ2βΏ3 + + a β 3βΏ3 β₯ 9 + + 1βΏ2βΏ3 Β« a + + diff --git a/help/sign_multiply.md b/help/sign_multiply.md new file mode 100644 index 00000000..3b8fa8de --- /dev/null +++ b/help/sign_multiply.md @@ -0,0 +1,28 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/sign_multiply.html).* + +# Times (`Γ`) + +## `Γ π©`: Sign + +Sign of `π©`. +- `Β―1` if `π© < 0` +- `0` if `π© = 0` +- `1` if `π© > 0` + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + Γ Β―5βΏ0βΏ5βΏ1 + + + +## `π¨ Γ π©`: Multiply + +`π¨` multiplied by `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 Γ 2 + + 2 Γ 2βΏ3βΏ4 + + diff --git a/help/solo_couple.md b/help/solo_couple.md new file mode 100644 index 00000000..ac66e5c2 --- /dev/null +++ b/help/solo_couple.md @@ -0,0 +1,33 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/solo_couple.html).* + +# Tape (`β`) + +## `β π©`: Solo + +Add a dimension to `π©`. + + β 1 + + + ββ 1 + + + βββ 1 + + + ββ 1βΏ2βΏ3βΏ4 + + + βββ 1βΏ2βΏ3βΏ4 + + + +## `π¨ β π©`: Couple + +Join `π¨` and `π©` along a newly created axis. + + 1 β 3 + + 1βΏ2 β 2βΏ3 + + diff --git a/help/sortdown_or.md b/help/sortdown_or.md new file mode 100644 index 00000000..03982acd --- /dev/null +++ b/help/sortdown_or.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/sortdown_or.html).* + +# Logical Or (`β¨`) + +## `β¨ π©`: Sort Down + +Sort array `π©` in descending order. + + β¨ 3βΏ1βΏ4βΏ1βΏ5 + + + +## `π¨ β¨ π©`: Logical Or + +Logical Or of `π¨` and `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β¨ 0 + + 1βΏ0 β¨ 1βΏ1 + + 0 β¨ 0 + + diff --git a/help/sortup_and.md b/help/sortup_and.md new file mode 100644 index 00000000..bf727848 --- /dev/null +++ b/help/sortup_and.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/sortup_and.html).* + +# Logical And (`β§`) + +## `β§ π©`: Sort Up + +Sort array `π©` in ascending order. + + β§ 3βΏ1βΏ4βΏ1βΏ5 + + + +## `π¨ β§ π©`: Logical And + +Logical And of `π¨` and `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 1 β§ 1 + + 1βΏ0 β§ 1βΏ1 + + diff --git a/help/squareroot_root.md b/help/squareroot_root.md new file mode 100644 index 00000000..c97c92c5 --- /dev/null +++ b/help/squareroot_root.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/squareroot_root.html).* + +# Root (`β`) + +## `β π©`: Square root + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + β 2 + + + +## `π¨ β π©`: Root + +`π¨`th root of `π©`. + +[Pervasive.](https://mlochbaum.github.io/BQN/doc/arithmetic.html#pervasion) + + 2 β 2 + + 1βΏ2βΏ3βΏ4 β 4 + + diff --git a/help/suffixes_drop.md b/help/suffixes_drop.md new file mode 100644 index 00000000..10c93520 --- /dev/null +++ b/help/suffixes_drop.md @@ -0,0 +1,34 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/suffixes_drop.html).* + +# Down Arrow (`β`) + +## `β π©`: Suffixes + +Suffixes of array `π©` along its first axis. + + β 1βΏ2βΏ3βΏ4 + + a β 3βΏ3 β₯ β9 + + β a + + + +## `π¨ β π©`: Drop + +For each integer in `π¨`, drop that many elements from the beginning of each dimension of `π©`. + +Negative numbers drop from the end. + + 3 β 1βΏ3βΏ5βΏ67 + + a β 4βΏ4 β₯ β16 + + 3βΏ3 β a + + 5βΏ5 β a + + + 3βΏΒ―3 β a + + diff --git a/help/table.md b/help/table.md new file mode 100644 index 00000000..dd190660 --- /dev/null +++ b/help/table.md @@ -0,0 +1,13 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/table.html).* + +# Top Left Corner (`β`) + +## `π¨ π½β π©`: Each + +Apply `π½` between every possible pair of the elements of the arguments. + + 1βΏ2βΏ3βΏ4 +β 4βΏ5βΏ6βΏ7 + + "abc" βΎβ "xyz" + + diff --git a/help/transpose_dyadtranspose.md b/help/transpose_dyadtranspose.md new file mode 100644 index 00000000..d3db90ab --- /dev/null +++ b/help/transpose_dyadtranspose.md @@ -0,0 +1,27 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/transpose_dyadtranspose.html).* + +# Circle Backslash (`β`) + +## `β π©`: Transpose + +Move the first axis of `π©` to the end. + + a β 3βΏ3 β₯ β9 + + β a + + b β 1βΏ2βΏ3 β₯ β6 + + β’β b + + + +## `π¨ β π©`: Dyad + +Rearrange the axes of `π©` as per the axis indices in `π¨`. + + β’ a β 2βΏ3βΏ4βΏ5βΏ6 β₯1 + + β’ 1βΏ3βΏ2βΏ0βΏ4 β a + + diff --git a/help/under.md b/help/under.md new file mode 100644 index 00000000..0eb86091 --- /dev/null +++ b/help/under.md @@ -0,0 +1,22 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/under.html).* + +# Circle Jot (`βΎ`) + +## `π½βΎπΎ π©`, `π¨ π½βΎπΎ π©`: Under + +- Apply transformation `πΎ` to all arguments +- Apply `π½` to the transformed arguments +- Undo transformation `πΎ` + +Where `πΎ` must be + +1. A function invertible by `βΌ` (Undo) +2. A structural modification + + 9βΎ(1βΈβ) 1βΏ2βΏ3 + + ββΌ (β1) + (β9) + + 1 +βΎβ 9 + + diff --git a/help/undo.md b/help/undo.md new file mode 100644 index 00000000..0daa6469 --- /dev/null +++ b/help/undo.md @@ -0,0 +1,22 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/undo.html).* + +# Superscript Equals Sign (`βΌ`) + +## `π½βΌ π©`, `π¨ π½βΌ π©`: Undo + +Invert the function `π½`, or use its defined inverse. Not all functions have inverses. + + + 1 - 2 + + 1 -βΌ 2 + + β 16 + + ββΌ 4 + + β 1 + + ββΌ 2.718281828459045 + + diff --git a/help/valences.md b/help/valences.md new file mode 100644 index 00000000..d7ef83b8 --- /dev/null +++ b/help/valences.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/valences.html).* + +# Circled Division Slash (`β`) + +## `π½βπΎ π©`: Valences + +Apply `π½` to `π©`. + + +β- 5 + + -β+ 5 + + + +## `π¨ π½βπΎ π©`: Valences + +Apply `πΎ` to `π¨` and `π©`. + + 4 +β- 5 + + 4 -β+ 5 + + |
