diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-20 07:58:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-20 07:58:45 -0500 |
| commit | badafe5340c98a71c72d1f161a4756dc7782ba86 (patch) | |
| tree | bc89e3b80c84d854f382e03fdbb5a43e08d791b8 | |
| parent | 97e5db7fa0bf2389589a99ccd26cf84c1e0ced73 (diff) | |
| parent | f3d45a1ca914d59968531a6d5c409d80b73e53c3 (diff) | |
Merge pull request #58 from razetime/master
complete REPL help for symbols
59 files changed, 970 insertions, 8 deletions
diff --git a/docs/help/2-modifierrightoperand.html b/docs/help/2-modifierrightoperand.html new file mode 100644 index 00000000..d8f02b07 --- /dev/null +++ b/docs/help/2-modifierrightoperand.html @@ -0,0 +1,12 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Mathematical Double-struck G (`πΎ`)</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="mathematical-double-struck-g-"><a class="header" href="#mathematical-double-struck-g-">Mathematical Double-struck G (<code><span class='Function'>πΎ</span></code>)</a></h1> +<h2 id="-2-modifier-right-operand"><a class="header" href="#-2-modifier-right-operand"><code><span class='Function'>πΎ</span></code>: 2-Modifier Right operand</a></h2> +<p>A variable assigned to the right operand of a 2-modifier block. <code><span class='Value'>π</span></code> can be used to access the right operand as a value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSAre/CdlZh9MyAx">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>+</span><span class='Brace'>{</span><span class='Value'>π</span><span class='Brace'>}</span><span class='Number'>3</span> <span class='Number'>1</span> +3 +</pre> diff --git a/docs/help/assert_assertwithmessage.html b/docs/help/assert_assertwithmessage.html index e172ecbd..ec3e9e16 100644 --- a/docs/help/assert_assertwithmessage.html +++ b/docs/help/assert_assertwithmessage.html @@ -16,7 +16,7 @@ <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> +<h2 id="---assert-with-message"><a class="header" href="#---assert-with-message"><code><span class='Value'>π¨</span> <span class='Function'>!</span> <span class='Value'>π©</span></code>: Assert With Message</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 diff --git a/docs/help/beginblock.html b/docs/help/beginblock.html new file mode 100644 index 00000000..af1f3d4b --- /dev/null +++ b/docs/help/beginblock.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: Left Curly Bracket (`{`)</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-curly-bracket-"><a class="header" href="#left-curly-bracket-">Left Curly Bracket (<code><span class='Brace'>{</span></code>)</a></h1> +<h2 id="--begin-block"><a class="header" href="#--begin-block"><code><span class='Brace'>{</span> <span class='Value'>...</span></code>: Begin Block</a></h2> +<p>Starts a block, which can be one of:</p> +<ul> +<li>Function</li> +<li>1-Modifier</li> +<li>2-Modifier</li> +<li>Namespace</li> +<li>Immediate Block</li> +</ul> +<p>Must end with a corresponding <code><span class='Brace'>}</span></code>.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=e/CdlaggKyDwnZWpfSAgICMgRnVuY3Rpb24KCnvwnZWo4oC/8J2UveKAv/Cdlal9ICAgIyAxLW1vZGlmaWVyCgp78J2VqOKAv/CdlL3igL/wnZS+4oC/8J2VqX0gIyAyLW1vZGlmaWVyCgp7YSDih5AgNX0gICAjIE5hbWVzcGFjZQoKezUrNCs2fSAgICMgSW1tZWRpYXRlIGJsb2Nr">βοΈ</a><pre> <span class='Brace'>{</span><span class='Value'>π¨</span> <span class='Function'>+</span> <span class='Value'>π©</span><span class='Brace'>}</span> <span class='Comment'># Function +</span>(function block) + + <span class='Brace'>{</span><span class='Value'>π¨</span><span class='Ligature'>βΏ</span><span class='Function'>π½</span><span class='Ligature'>βΏ</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Comment'># 1-modifier +</span>(1-modifier block) + + <span class='Brace'>{</span><span class='Value'>π¨</span><span class='Ligature'>βΏ</span><span class='Function'>π½</span><span class='Ligature'>βΏ</span><span class='Function'>πΎ</span><span class='Ligature'>βΏ</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Comment'># 2-modifier +</span>(2-modifier block) + + <span class='Brace'>{</span><span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>5</span><span class='Brace'>}</span> <span class='Comment'># Namespace +</span>{aβ} + + <span class='Brace'>{</span><span class='Number'>5</span><span class='Function'>+</span><span class='Number'>4</span><span class='Function'>+</span><span class='Number'>6</span><span class='Brace'>}</span> <span class='Comment'># Immediate block +</span>15 +</pre> diff --git a/docs/help/beginexpression.html b/docs/help/beginexpression.html new file mode 100644 index 00000000..1e33e206 --- /dev/null +++ b/docs/help/beginexpression.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: Left Parenthesis (`(`)</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-parenthesis-"><a class="header" href="#left-parenthesis-">Left Parenthesis (<code><span class='Paren'>(</span></code>)</a></h1> +<h2 id="--begin-expression"><a class="header" href="#--begin-expression"><code><span class='Paren'>(</span> <span class='Value'>...</span></code>: Begin Expression</a></h2> +<p>Starts an expression, and only one expression. Must end with a corresponding <code><span class='Paren'>)</span></code>.</p> +<p><code><span class='Paren'>(</span></code> gives higher precedence to the expression in it, and BQN will evaluate expressions in <code><span class='Paren'>()</span></code> first.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MSArIDIgLSAzCgooMSArIDIpIC0gMw==">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>2</span> <span class='Function'>-</span> <span class='Number'>3</span> +0 + + <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> +0 +</pre> diff --git a/docs/help/beginlist.html b/docs/help/beginlist.html new file mode 100644 index 00000000..5fc90b43 --- /dev/null +++ b/docs/help/beginlist.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: Mathematical Left Angle Bracket (`β¨`)</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="mathematical-left-angle-bracket-"><a class="header" href="#mathematical-left-angle-bracket-">Mathematical Left Angle Bracket (<code><span class='Bracket'>β¨</span></code>)</a></h1> +<h2 id="--begin-list"><a class="header" href="#--begin-list"><code><span class='Bracket'>β¨</span> <span class='Value'>...</span></code>: Begin list</a></h2> +<p>Starts a list. Inner elements must be separated by <code><span class='Separator'>,</span></code> or <code><span class='Separator'>β</span></code>. +Lists can be nested in other lists.</p> +<p>Must end with a corresponding <code><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=4p+oMSwgMiwgM+KfqQoK4p+oKyDii4QgLSDii4QgNTbin6k=">βοΈ</a><pre> <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 2 3 β© + + <span class='Bracket'>β¨</span><span class='Function'>+</span> <span class='Separator'>β</span> <span class='Function'>-</span> <span class='Separator'>β</span> <span class='Number'>56</span><span class='Bracket'>β©</span> +β¨ + - 56 β© +</pre> diff --git a/docs/help/change.html b/docs/help/change.html new file mode 100644 index 00000000..147ea5db --- /dev/null +++ b/docs/help/change.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: Leftwards Arrow With Hook (`β`)</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="leftwards-arrow-with-hook-"><a class="header" href="#leftwards-arrow-with-hook-">Leftwards Arrow With Hook (<code><span class='Gets'>β</span></code>)</a></h1> +<h2 id="n--v-change"><a class="header" href="#n--v-change"><code><span class='Value'>n</span> <span class='Gets'>β©</span> <span class='Value'>v</span></code>: Change</a></h2> +<p>Changes the value of variable with name <code><span class='Value'>n</span></code> to value <code><span class='Value'>v</span></code>.</p> +<p>Variable <code><span class='Value'>n</span></code> must already exist.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=YSDihqkgMQoK4oqiIGIg4oaQIDMKCuKKoiBiIOKGqSAiQmUgdGhlIGNoYW5nZSB5b3Ugd2lzaCB0byBzZWUgaW4gdGhlIHdvcmxkLiI=">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β©</span> <span class='Number'>1</span> +<span class='Error'>Error: Undefined identifier</span> + + <span class='Function'>β’</span> <span class='Value'>b</span> <span class='Gets'>β</span> <span class='Number'>3</span> +3 + + <span class='Function'>β’</span> <span class='Value'>b</span> <span class='Gets'>β©</span> <span class='String'>"Be the change you wish to see in the world."</span> +"Be the change you wish to see in the world." +</pre> diff --git a/docs/help/comment.html b/docs/help/comment.html new file mode 100644 index 00000000..d35ee10e --- /dev/null +++ b/docs/help/comment.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: Number 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="number-sign-"><a class="header" href="#number-sign-">Number Sign (<code><span class='Comment'>#</span></code>)</a></h1> +<h2 id="-comment"><a class="header" href="#-comment"><code><span class='Comment'>#</span></code>: Comment</a></h2> +<p>Create a comment that extends till the end of a line.</p> +<p>Anything written in comments is ignored.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MSArIDIgIyArIDMgKyA0CgoiSGVsbG8gd29ybGQhIiAjIHRoaXMgaXMgaWdub3JlZCE=">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>2</span> <span class='Comment'># + 3 + 4 +</span>3 + + <span class='String'>"Hello world!"</span> <span class='Comment'># this is ignored! +</span>"Hello world!" +</pre> diff --git a/docs/help/currentfunction.html b/docs/help/currentfunction.html new file mode 100644 index 00000000..dd0ac5b0 --- /dev/null +++ b/docs/help/currentfunction.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: Mathematical Double-struck 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="mathematical-double-struck-s-"><a class="header" href="#mathematical-double-struck-s-">Mathematical Double-struck S (<code><span class='Function'>π</span></code>)</a></h1> +<h2 id="-current-function"><a class="header" href="#-current-function"><code><span class='Function'>π</span></code>: Current Function</a></h2> +<p>A variable assigned to the current function block. <code><span class='Value'>π€</span></code> can be used to access the current function block as a value.</p> +<p><code><span class='Function'>π</span></code> can be used for recursion.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=RiDihpAge/CdlYogMDogMTsg8J2VqSDDlyDwnZWKIPCdlaktMX0gIyBGYWN0b3JpYWwKRiA1Cgp78J2VpOKAv/CdlaR9NA==">βοΈ</a><pre> <span class='Function'>F</span> <span class='Gets'>β</span> <span class='Brace'>{</span><span class='Function'>π</span> <span class='Number'>0</span><span class='Value'>:</span> <span class='Number'>1</span><span class='Value'>;</span> <span class='Value'>π©</span> <span class='Function'>Γ</span> <span class='Function'>π</span> <span class='Value'>π©</span><span class='Function'>-</span><span class='Number'>1</span><span class='Brace'>}</span> <span class='Comment'># Factorial +</span> <span class='Function'>F</span> <span class='Number'>5</span> +120 + + <span class='Brace'>{</span><span class='Value'>π€</span><span class='Ligature'>βΏ</span><span class='Value'>π€</span><span class='Brace'>}</span><span class='Number'>4</span> +β¨ (function block) (function block) β© +</pre> diff --git a/docs/help/currentmodifier.html b/docs/help/currentmodifier.html new file mode 100644 index 00000000..e1481382 --- /dev/null +++ b/docs/help/currentmodifier.html @@ -0,0 +1,12 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Mathematical Double-struck R (`π£`)</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="mathematical-double-struck-r-"><a class="header" href="#mathematical-double-struck-r-">Mathematical Double-struck R (<code><span class='Value'>π£</span></code>)</a></h1> +<h2 id="-current-modifier"><a class="header" href="#-current-modifier"><code><span class='Value'>π£</span></code>: Current Modifier</a></h2> +<p>A variable assigned to the current modifier block. Underscores must be added to the beginning and/or end (<code><span class='Modifier'>_π£</span></code>, <code><span class='Modifier2'>_π£_</span></code>) to use the modifier with the correct role.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=K3vwnZWj4oqj8J2VqX0gNCAgICAgICAg">βοΈ</a><pre> <span class='Function'>+</span><span class='Brace'>{</span><span class='Value'>π£</span><span class='Function'>β£</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Number'>4</span> +(1-modifier block) +</pre> diff --git a/docs/help/define.html b/docs/help/define.html new file mode 100644 index 00000000..d5399cd1 --- /dev/null +++ b/docs/help/define.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: Leftwards 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="leftwards-arrow-"><a class="header" href="#leftwards-arrow-">Leftwards Arrow (<code><span class='Gets'>β</span></code>)</a></h1> +<h2 id="n--v-define"><a class="header" href="#n--v-define"><code><span class='Value'>n</span> <span class='Gets'>β</span> <span class='Value'>v</span></code>: Define</a></h2> +<p>Defines a new variable with name <code><span class='Value'>n</span></code> and value <code><span class='Value'>v</span></code>.</p> +<p>Variable <code><span class='Value'>n</span></code> must not already exist.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGEg4oaQIDEKCuKKoiBiIOKGkCAz4oC/MyDipYogNQoKQyDihpAg4oaR">βοΈ</a><pre> <span class='Function'>β’</span> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>1</span> +1 + + <span class='Function'>β’</span> <span class='Value'>b</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'>5</span> +ββ +β΅ 5 5 5 + 5 5 5 + 5 5 5 + β + + <span class='Function'>C</span> <span class='Gets'>β</span> <span class='Function'>β</span> +</pre> diff --git a/docs/help/endblock.html b/docs/help/endblock.html new file mode 100644 index 00000000..5cac2a7c --- /dev/null +++ b/docs/help/endblock.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: Right Curly Bracket (`}`)</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-curly-bracket-"><a class="header" href="#right-curly-bracket-">Right Curly Bracket (<code><span class='Brace'>}</span></code>)</a></h1> +<h2 id="--end-block"><a class="header" href="#--end-block"><code><span class='Value'>...</span> <span class='Brace'>}</span></code>: End Block</a></h2> +<p>Starts a block, which starts with <code><span class='Brace'>}</span></code>. See <a href="beginblock.html">Begin Block</a> for more details.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=e/CdlaggKyDwnZWpfSAgICMgRnVuY3Rpb24KCnvwnZWo4oC/8J2UveKAv/Cdlal9ICAgIyAxLW1vZGlmaWVyCgp78J2VqOKAv/CdlL3igL/wnZS+4oC/8J2VqX0gIyAyLW1vZGlmaWVyCgp7YSDih5AgNX0gICAjIE5hbWVzcGFjZQoKezUrNCs2fSAgICMgSW1tZWRpYXRlIGJsb2Nr">βοΈ</a><pre> <span class='Brace'>{</span><span class='Value'>π¨</span> <span class='Function'>+</span> <span class='Value'>π©</span><span class='Brace'>}</span> <span class='Comment'># Function +</span>(function block) + + <span class='Brace'>{</span><span class='Value'>π¨</span><span class='Ligature'>βΏ</span><span class='Function'>π½</span><span class='Ligature'>βΏ</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Comment'># 1-modifier +</span>(1-modifier block) + + <span class='Brace'>{</span><span class='Value'>π¨</span><span class='Ligature'>βΏ</span><span class='Function'>π½</span><span class='Ligature'>βΏ</span><span class='Function'>πΎ</span><span class='Ligature'>βΏ</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Comment'># 2-modifier +</span>(2-modifier block) + + <span class='Brace'>{</span><span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>5</span><span class='Brace'>}</span> <span class='Comment'># Namespace +</span>{aβ} + + <span class='Brace'>{</span><span class='Number'>5</span><span class='Function'>+</span><span class='Number'>4</span><span class='Function'>+</span><span class='Number'>6</span><span class='Brace'>}</span> <span class='Comment'># Immediate block +</span>15 +</pre> diff --git a/docs/help/endexpression.html b/docs/help/endexpression.html new file mode 100644 index 00000000..e180ae85 --- /dev/null +++ b/docs/help/endexpression.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: Right Parenthesis (`)`)</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-parenthesis-"><a class="header" href="#right-parenthesis-">Right Parenthesis (<code><span class='Paren'>)</span></code>)</a></h1> +<h2 id="--end-expression"><a class="header" href="#--end-expression"><code><span class='Value'>...</span> <span class='Paren'>)</span></code>: End Expression</a></h2> +<p>The closing symbol for <code><span class='Paren'>(</span></code>. See <a href="beginexpression.html">Begin Expression</a> for more details.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MSArIDIgLSAzCgooMSArIDIpIC0gMw==">βοΈ</a><pre> <span class='Number'>1</span> <span class='Function'>+</span> <span class='Number'>2</span> <span class='Function'>-</span> <span class='Number'>3</span> +0 + + <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> +0 +</pre> diff --git a/docs/help/endlist.html b/docs/help/endlist.html new file mode 100644 index 00000000..633509f1 --- /dev/null +++ b/docs/help/endlist.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: Mathematical Right Angle Bracket (`β©`)</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="mathematical-right-angle-bracket-"><a class="header" href="#mathematical-right-angle-bracket-">Mathematical Right Angle Bracket (<code><span class='Bracket'>β©</span></code>)</a></h1> +<h2 id="--end-list"><a class="header" href="#--end-list"><code><span class='Value'>...</span> <span class='Bracket'>β©</span></code>: End list</a></h2> +<p>Ends a list started by a <code><span class='Bracket'>β¨</span></code>. See <a href="beginlist.html">Begin List</a> for more details.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oMSwgMiwgM+KfqQoK4p+oKyDii4QgLSDii4QgNTbin6k=">βοΈ</a><pre> <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 2 3 β© + + <span class='Bracket'>β¨</span><span class='Function'>+</span> <span class='Separator'>β</span> <span class='Function'>-</span> <span class='Separator'>β</span> <span class='Number'>56</span><span class='Bracket'>β©</span> +β¨ + - 56 β© +</pre> diff --git a/docs/help/export.html b/docs/help/export.html new file mode 100644 index 00000000..dced1f53 --- /dev/null +++ b/docs/help/export.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: Leftward Double 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="leftward-double-arrow-"><a class="header" href="#leftward-double-arrow-">Leftward Double Arrow (<code><span class='Gets'>β</span></code>)</a></h1> +<h2 id="n--v-export-definition"><a class="header" href="#n--v-export-definition"><code><span class='Value'>n</span> <span class='Gets'>β</span> <span class='Value'>v</span></code>: Export Definition</a></h2> +<p>Define a variable with name <code><span class='Value'>n</span></code> and export it from the current namespace or program's scope.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=bnMg4oaQIHsgZXhwb3J0ZWQg4oeQIDUsIHVuZXhwb3J0ZWQg4oaQIDB9Cm5zLmV4cG9ydGVkCm5zLnVuZXhwb3J0ZWQ=">βοΈ</a><pre> <span class='Value'>ns</span> <span class='Gets'>β</span> <span class='Brace'>{</span> <span class='Value'>exported</span> <span class='Gets'>β</span> <span class='Number'>5</span><span class='Separator'>,</span> <span class='Value'>unexported</span> <span class='Gets'>β</span> <span class='Number'>0</span><span class='Brace'>}</span> + <span class='Value'>ns.exported</span> +5 + <span class='Value'>ns.unexported</span> +<span class='Error'>Error: No key found</span> +</pre> +<h2 id="--export-names"><a class="header" href="#--export-names"><code><span class='Value'>π¨</span> <span class='Gets'>β</span></code>: Export names</a></h2> +<p>Export the names given in <code><span class='Value'>π©</span></code> from the current namespace or program's scope. Names must be defined.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=bnMxIOKGkCB7IOKfqGFsc29leHBvcnRlZOKfqeKHkCwgZXhwb3J0ZWQg4oeQIDUsIGFsc29leHBvcnRlZCDihpAgMH0KbnMxLmV4cG9ydGVkCm5zMS5hbHNvZXhwb3J0ZWQ=">βοΈ</a><pre> <span class='Value'>ns1</span> <span class='Gets'>β</span> <span class='Brace'>{</span> <span class='Bracket'>β¨</span><span class='Value'>alsoexported</span><span class='Bracket'>β©</span><span class='Gets'>β</span><span class='Separator'>,</span> <span class='Value'>exported</span> <span class='Gets'>β</span> <span class='Number'>5</span><span class='Separator'>,</span> <span class='Value'>alsoexported</span> <span class='Gets'>β</span> <span class='Number'>0</span><span class='Brace'>}</span> + <span class='Value'>ns1.exported</span> +5 + <span class='Value'>ns1.alsoexported</span> +0 +</pre> diff --git a/docs/help/field.html b/docs/help/field.html new file mode 100644 index 00000000..2de58500 --- /dev/null +++ b/docs/help/field.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: Full Stop (`.`)</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="full-stop-"><a class="header" href="#full-stop-">Full Stop (<code><span class='Value'>.</span></code>)</a></h1> +<h2 id="ns--name-namespace-field"><a class="header" href="#ns--name-namespace-field"><code><span class='Value'>ns</span> <span class='Value'>.</span> <span class='Value'>name</span></code>: Namespace Field</a></h2> +<p>Access a field with name <code><span class='Value'>name</span></code> in namespace <code><span class='Value'>ns</span></code>. Field must have been exported with <code><span class='Gets'>β</span></code>.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=e2Hih5AxfSAuIGEKCntG4oeQLX0uRiA1">βοΈ</a><pre> <span class='Brace'>{</span><span class='Value'>a</span><span class='Gets'>β</span><span class='Number'>1</span><span class='Brace'>}</span> <span class='Value'>.</span> <span class='Value'>a</span> +1 + + <span class='Brace'>{</span><span class='Function'>F</span><span class='Gets'>β</span><span class='Function'>-</span><span class='Brace'>}</span><span class='Value'>.</span><span class='Function'>F</span> <span class='Number'>5</span> +Β―5 +</pre> diff --git a/docs/help/index.html b/docs/help/index.html index 12b1abc2..a47d3eda 100644 --- a/docs/help/index.html +++ b/docs/help/index.html @@ -5,6 +5,7 @@ </head> <div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a></div> <h1 id="repl-help"><a class="header" href="#repl-help">REPL Help</a></h1> +<p>Symbols are listed in alphabetical order of page name, ignoring syntactical roles.</p> <table> <thead> <tr> @@ -14,6 +15,10 @@ </thead> <tbody> <tr> +<td><code><span class='Function'>πΎ</span></code></td> +<td><a href="2-modifierrightoperand.html">2-Modifier Right operand</a></td> +</tr> +<tr> <td><code><span class='Function'>|</span></code></td> <td><a href="absolutevalue_modulus.html">Absolute Value, Modulus</a></td> </tr> @@ -23,7 +28,7 @@ </tr> <tr> <td><code><span class='Function'>!</span></code></td> -<td><a href="assert_assertwithmessage.html">Assert, Dyad</a></td> +<td><a href="assert_assertwithmessage.html">Assert, Assert With Message</a></td> </tr> <tr> <td><code><span class='Modifier2'>β</span></code></td> @@ -34,6 +39,18 @@ <td><a href="before_bind.html">Bind Left, Before, Dyadic Before</a></td> </tr> <tr> +<td><code><span class='Brace'>{</span></code></td> +<td><a href="beginblock.html">Begin Block</a></td> +</tr> +<tr> +<td><code><span class='Paren'>(</span></code></td> +<td><a href="beginexpression.html">Begin Expression</a></td> +</tr> +<tr> +<td><code><span class='Bracket'>β¨</span></code></td> +<td><a href="beginlist.html">Begin list</a></td> +</tr> +<tr> <td><code><span class='Modifier2'>β</span></code></td> <td><a href="catch.html">Catch</a></td> </tr> @@ -46,6 +63,10 @@ <td><a href="cells.html">Cells</a></td> </tr> <tr> +<td><code><span class='Gets'>β</span></code></td> +<td><a href="change.html">Change</a></td> +</tr> +<tr> <td><code><span class='Modifier2'>βΆ</span></code></td> <td><a href="choose.html">Choose</a></td> </tr> @@ -54,6 +75,10 @@ <td><a href="classify_indexof.html">Classify, Index Of</a></td> </tr> <tr> +<td><code><span class='Comment'>#</span></code></td> +<td><a href="comment.html">Comment</a></td> +</tr> +<tr> <td><code><span class='Function'>+</span></code></td> <td><a href="conjugate_add.html">Conjugate, Add</a></td> </tr> @@ -62,10 +87,22 @@ <td><a href="constant.html">Constant</a></td> </tr> <tr> +<td><code><span class='Function'>π</span></code></td> +<td><a href="currentfunction.html">Current Function</a></td> +</tr> +<tr> +<td><code><span class='Value'>π£</span></code></td> +<td><a href="currentmodifier.html">Current Modifier</a></td> +</tr> +<tr> <td><code><span class='Function'>β·</span></code></td> <td><a href="deduplicate_find.html">Deduplicate, Find</a></td> </tr> <tr> +<td><code><span class='Gets'>β</span></code></td> +<td><a href="define.html">Define</a></td> +</tr> +<tr> <td><code><span class='Function'>β‘</span></code></td> <td><a href="depth_match.html">Depth, Match</a></td> </tr> @@ -86,6 +123,18 @@ <td><a href="enclose_lessthan.html">Enclose, Lesser Than</a></td> </tr> <tr> +<td><code><span class='Brace'>}</span></code></td> +<td><a href="endblock.html">End Block</a></td> +</tr> +<tr> +<td><code><span class='Paren'>)</span></code></td> +<td><a href="endexpression.html">End Expression</a></td> +</tr> +<tr> +<td><code><span class='Bracket'>β©</span></code></td> +<td><a href="endlist.html">End list</a></td> +</tr> +<tr> <td><code><span class='Function'>β</span></code></td> <td><a href="enlist_pair.html">Enlist, Pair</a></td> </tr> @@ -94,6 +143,14 @@ <td><a href="exponential_power.html">Exponential, Power</a></td> </tr> <tr> +<td><code><span class='Gets'>β</span></code></td> +<td><a href="export.html">Export Definition, Export names</a></td> +</tr> +<tr> +<td><code><span class='Value'>.</span></code></td> +<td><a href="field.html">Namespace Field</a></td> +</tr> +<tr> <td><code><span class='Function'>β</span></code></td> <td><a href="firstcell_select.html">First Cell, Select</a></td> </tr> @@ -138,6 +195,10 @@ <td><a href="indices_replicate.html">Indices, Replicate</a></td> </tr> <tr> +<td><code><span class='Number'>β</span></code></td> +<td><a href="infinity.html">Infinity</a></td> +</tr> +<tr> <td><code><span class='Modifier'>Λ</span></code></td> <td><a href="insert.html">Insert, Insert With initial</a></td> </tr> @@ -146,6 +207,10 @@ <td><a href="join_jointo.html">Join, Join</a></td> </tr> <tr> +<td><code><span class='Value'>π¨</span></code></td> +<td><a href="leftargument.html">Left Argument</a></td> +</tr> +<tr> <td><code><span class='Function'>β </span></code></td> <td><a href="length_notequals.html">Length, Not Equal To</a></td> </tr> @@ -162,14 +227,30 @@ <td><a href="merge_greaterthan.html">Merge, Greater Than</a></td> </tr> <tr> +<td><code><span class='Number'>Β―</span></code></td> +<td><a href="minus.html">Minus</a></td> +</tr> +<tr> +<td><code><span class='Function'>π½</span></code></td> +<td><a href="modifierleftoperand.html">Modifier Left operand</a></td> +</tr> +<tr> <td><code><span class='Function'>-</span></code></td> <td><a href="negate_subtract.html">Negate, Subtract</a></td> </tr> <tr> +<td><code><span class='Nothing'>Β·</span></code></td> +<td><a href="nothing.html">Nothing</a></td> +</tr> +<tr> <td><code><span class='Function'>Β¬</span></code></td> <td><a href="not_span.html">Logical Not, Span</a></td> </tr> <tr> +<td><code><span class='String'>@</span></code></td> +<td><a href="nullcharacter.html">Null Character</a></td> +</tr> +<tr> <td><code><span class='Function'>β</span></code></td> <td><a href="occurrencecount_progressiveindexof.html">Occurrence Count, Progressive Index Of</a></td> </tr> @@ -178,6 +259,10 @@ <td><a href="over.html">Atop, Over</a></td> </tr> <tr> +<td><code><span class='Number'>Ο</span></code></td> +<td><a href="pi.html">Pi</a></td> +</tr> +<tr> <td><code><span class='Function'>β</span></code></td> <td><a href="prefixes_take.html">Prefixes, Take</a></td> </tr> @@ -206,6 +291,10 @@ <td><a href="reverse_rotate.html">Reverse, Dyad</a></td> </tr> <tr> +<td><code><span class='Value'>π©</span></code></td> +<td><a href="rightargument.html">Right Argument</a></td> +</tr> +<tr> <td><code><span class='Modifier'>`</span></code></td> <td><a href="scan.html">Scan, Scan With initial</a></td> </tr> @@ -214,6 +303,14 @@ <td><a href="self_swap.html">Self, Swap</a></td> </tr> <tr> +<td><code><span class='Separator'>,</span></code></td> +<td><a href="separator1.html">Separator</a></td> +</tr> +<tr> +<td><code><span class='Separator'>β</span></code></td> +<td><a href="separator.html">Separator</a></td> +</tr> +<tr> <td><code><span class='Function'>β’</span></code></td> <td><a href="shape_notmatch.html">Shape, Not Match</a></td> </tr> @@ -246,10 +343,18 @@ <td><a href="squareroot_root.html">Square root, Root</a></td> </tr> <tr> +<td><code><span class='Ligature'>βΏ</span></code></td> +<td><a href="strand.html">Strand</a></td> +</tr> +<tr> <td><code><span class='Function'>β</span></code></td> <td><a href="suffixes_drop.html">Suffixes, Drop</a></td> </tr> <tr> +<td><code><span class='Value'>β’</span></code></td> +<td><a href="system.html">System</a></td> +</tr> +<tr> <td><code><span class='Modifier'>β</span></code></td> <td><a href="table.html">Each</a></td> </tr> diff --git a/docs/help/infinity.html b/docs/help/infinity.html new file mode 100644 index 00000000..c74c6f53 --- /dev/null +++ b/docs/help/infinity.html @@ -0,0 +1,18 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Infinity (`β`)</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="infinity-"><a class="header" href="#infinity-">Infinity (<code><span class='Number'>β</span></code>)</a></h1> +<h2 id="-infinity"><a class="header" href="#-infinity"><code><span class='Number'>β</span></code>: Infinity</a></h2> +<p>Mathematical constant Infinity. Shares the same status as other numbers, can be negative (<code><span class='Number'>Β―β</span></code>).</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oieCgrCr+KIngoKMSviiJ4=">βοΈ</a><pre> <span class='Number'>β</span> +β + + <span class='Number'>Β―β</span> +Β―β + + <span class='Number'>1</span><span class='Function'>+</span><span class='Number'>β</span> +β +</pre> diff --git a/docs/help/leftargument.html b/docs/help/leftargument.html new file mode 100644 index 00000000..f1718e21 --- /dev/null +++ b/docs/help/leftargument.html @@ -0,0 +1,12 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Mathematical Double-struck W (`π¨`)</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="mathematical-double-struck-w-"><a class="header" href="#mathematical-double-struck-w-">Mathematical Double-struck W (<code><span class='Value'>π¨</span></code>)</a></h1> +<h2 id="-left-argument"><a class="header" href="#-left-argument"><code><span class='Value'>π¨</span></code>: Left Argument</a></h2> +<p>A variable assigned to the left argument of a block. <code><span class='Function'>π</span></code> can be used to access the left argument as a function.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSB78J2VqH0gMQ==">βοΈ</a><pre> <span class='Number'>5</span> <span class='Brace'>{</span><span class='Value'>π¨</span><span class='Brace'>}</span> <span class='Number'>1</span> +5 +</pre> diff --git a/docs/help/minus.html b/docs/help/minus.html new file mode 100644 index 00000000..965be169 --- /dev/null +++ b/docs/help/minus.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: Macron (`Β―`)</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="macron-"><a class="header" href="#macron-">Macron (<code><span class='Number'>Β―</span></code>)</a></h1> +<h2 id="-minus"><a class="header" href="#-minus"><code><span class='Number'>Β―</span></code>: Minus</a></h2> +<p>Prefix before numbers to indicate that they are negative.</p> +<p>Note that this is not the same as <code><span class='Function'>-</span></code>, since it is part of the number, rather than a primitive that negates its value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=LTHigL8y4oC/MwoKwq8x4oC/MuKAvzM=">βοΈ</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> +β¨ Β―1 Β―2 Β―3 β© + + <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/modifierleftoperand.html b/docs/help/modifierleftoperand.html new file mode 100644 index 00000000..71392719 --- /dev/null +++ b/docs/help/modifierleftoperand.html @@ -0,0 +1,12 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Mathematical Double-struck F (`π½`)</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="mathematical-double-struck-f-"><a class="header" href="#mathematical-double-struck-f-">Mathematical Double-struck F (<code><span class='Function'>π½</span></code>)</a></h1> +<h2 id="-modifier-left-operand"><a class="header" href="#-modifier-left-operand"><code><span class='Function'>π½</span></code>: Modifier Left operand</a></h2> +<p>A variable assigned to the left operand of a modifier block. <code><span class='Value'>π</span></code> can be used to access the left operand as a value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSAre/CdlZfiiqPwnZWofSAx">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>+</span><span class='Brace'>{</span><span class='Value'>π</span><span class='Function'>β£</span><span class='Value'>π¨</span><span class='Brace'>}</span> <span class='Number'>1</span> ++ +</pre> diff --git a/docs/help/modifierrightoperand.html b/docs/help/modifierrightoperand.html new file mode 100644 index 00000000..b8e5462d --- /dev/null +++ b/docs/help/modifierrightoperand.html @@ -0,0 +1,12 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Mathematical Double-struck G (`πΎ`)</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="mathematical-double-struck-g-"><a class="header" href="#mathematical-double-struck-g-">Mathematical Double-struck G (<code><span class='Function'>πΎ</span></code>)</a></h1> +<h2 id="-right-operand"><a class="header" href="#-right-operand"><code><span class='Function'>πΎ</span></code>: Right operand</a></h2> +<p>A variable assigned to the right operand of a modifier block. <code><span class='Value'>π</span></code> can be used to access the right operand as a value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSAre/CdlZh9MyAx">βοΈ</a><pre> <span class='Number'>5</span> <span class='Function'>+</span><span class='Brace'>{</span><span class='Value'>π</span><span class='Brace'>}</span><span class='Number'>3</span> <span class='Number'>1</span> +3 +</pre> diff --git a/docs/help/nothing.html b/docs/help/nothing.html new file mode 100644 index 00000000..53a04340 --- /dev/null +++ b/docs/help/nothing.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: Middle Dot (`Β·`)</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="middle-dot-"><a class="header" href="#middle-dot-">Middle Dot (<code><span class='Nothing'>Β·</span></code>)</a></h1> +<h2 id="-nothing"><a class="header" href="#-nothing"><code><span class='Nothing'>Β·</span></code>: Nothing</a></h2> +<h3 id="in-trains"><a class="header" href="#in-trains">In Trains</a></h3> +<p>Nothing can serve as a left argument in a train to string together multiple monadic functions.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KC0rLSkgNQoKKC3CtystKSA1">βοΈ</a><pre> <span class='Paren'>(</span><span class='Function'>-+-</span><span class='Paren'>)</span> <span class='Number'>5</span> +Β―10 + + <span class='Paren'>(</span><span class='Function'>-</span><span class='Nothing'>Β·</span><span class='Function'>+-</span><span class='Paren'>)</span> <span class='Number'>5</span> +5 +</pre> +<h3 id="in-block-headers"><a class="header" href="#in-block-headers">In Block Headers</a></h3> +<p>For Block header pattern matching syntax, Nothing can be used to indicate an unused value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=RiDihpAge/CdlYogYeKAv8K34oC/YjogYeKIvmJ9CgpGIDHigL8y4oC/Mw==">βοΈ</a><pre> <span class='Function'>F</span> <span class='Gets'>β</span> <span class='Brace'>{</span><span class='Function'>π</span> <span class='Value'>a</span><span class='Ligature'>βΏ</span><span class='Nothing'>Β·</span><span class='Ligature'>βΏ</span><span class='Value'>b:</span> <span class='Value'>a</span><span class='Function'>βΎ</span><span class='Value'>b</span><span class='Brace'>}</span> + + <span class='Function'>F</span> <span class='Number'>1</span><span class='Ligature'>βΏ</span><span class='Number'>2</span><span class='Ligature'>βΏ</span><span class='Number'>3</span> +β¨ 1 3 β© +</pre> diff --git a/docs/help/nullcharacter.html b/docs/help/nullcharacter.html new file mode 100644 index 00000000..ffcc9f1b --- /dev/null +++ b/docs/help/nullcharacter.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: Commercial At (`@`)</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="commercial-at-"><a class="header" href="#commercial-at-">Commercial At (<code><span class='String'>@</span></code>)</a></h1> +<h2 id="-null-character"><a class="header" href="#-null-character"><code><span class='String'>@</span></code>: Null Character</a></h2> +<p>Null character, codepoint 0 in ASCII. Has the status of any other character.</p> +<p>Can be added to any positive integer to get its character equivalent.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=QCs1MAoKQAoKQCs2NA==">βοΈ</a><pre> <span class='String'>@</span><span class='Function'>+</span><span class='Number'>50</span> +'2' + + <span class='String'>@</span> +@ + + <span class='String'>@</span><span class='Function'>+</span><span class='Number'>64</span> +'@' +</pre> diff --git a/docs/help/pi.html b/docs/help/pi.html new file mode 100644 index 00000000..f7db97a8 --- /dev/null +++ b/docs/help/pi.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: Pi (`Ο`)</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="pi-"><a class="header" href="#pi-">Pi (<code><span class='Number'>Ο</span></code>)</a></h1> +<h2 id="-pi"><a class="header" href="#-pi"><code><span class='Number'>Ο</span></code>: Pi</a></h2> +<p>Mathematical constant pi. Shares the same status as other numbers, can be negative (<code><span class='Number'>Β―Ο</span></code>).</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=z4AKCsKvz4A=">βοΈ</a><pre> <span class='Number'>Ο</span> +3.141592653589793 + + <span class='Number'>Β―Ο</span> +Β―3.141592653589793 +</pre> diff --git a/docs/help/rightargument.html b/docs/help/rightargument.html new file mode 100644 index 00000000..70ded70a --- /dev/null +++ b/docs/help/rightargument.html @@ -0,0 +1,12 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Mathematical Double-struck X (`π©`)</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="mathematical-double-struck-x-"><a class="header" href="#mathematical-double-struck-x-">Mathematical Double-struck X (<code><span class='Value'>π©</span></code>)</a></h1> +<h2 id="-right-argument"><a class="header" href="#-right-argument"><code><span class='Value'>π©</span></code>: Right Argument</a></h2> +<p>A variable assigned to the right argument of a block. <code><span class='Function'>π</span></code> can be used to access the right argument as a function.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSB78J2VqX0gMQ==">βοΈ</a><pre> <span class='Number'>5</span> <span class='Brace'>{</span><span class='Value'>π©</span><span class='Brace'>}</span> <span class='Number'>1</span> +1 +</pre> diff --git a/docs/help/separator.html b/docs/help/separator.html new file mode 100644 index 00000000..e719d8b4 --- /dev/null +++ b/docs/help/separator.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: Diamond (`β`)</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="diamond-"><a class="header" href="#diamond-">Diamond (<code><span class='Separator'>β</span></code>)</a></h1> +<h2 id="-separator"><a class="header" href="#-separator"><code><span class='Separator'>β</span></code>: Separator</a></h2> +<p>Separates statements in blocksβ programs and arrays.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=YSDihpAgMyDii4Qg4oqiIGIg4oaQIDIKCjEg4ouEIDIg4ouEIDMKCuKfqDEg4ouEIDIg4ouEIDPin6kKCnsxIOKLhCAyIOKLhCAzfQ==">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span> <span class='Separator'>β</span> <span class='Function'>β’</span> <span class='Value'>b</span> <span class='Gets'>β</span> <span class='Number'>2</span> +2 + + <span class='Number'>1</span> <span class='Separator'>β</span> <span class='Number'>2</span> <span class='Separator'>β</span> <span class='Number'>3</span> +3 + + <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 2 3 β© + + <span class='Brace'>{</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='Brace'>}</span> +3 +</pre> diff --git a/docs/help/separator1.html b/docs/help/separator1.html new file mode 100644 index 00000000..8461f453 --- /dev/null +++ b/docs/help/separator1.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: Comma (`,`)</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="comma-"><a class="header" href="#comma-">Comma (<code><span class='Separator'>,</span></code>)</a></h1> +<h2 id="-separator"><a class="header" href="#-separator"><code><span class='Separator'>,</span></code>: Separator</a></h2> +<p>Separates statements in blocks, programs and arrays.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=YSDihpAgMyAsIOKKoiBiIOKGkCAyCgoxICwgMiAsIDMKCuKfqDEsIDIsIDPin6kKCnsxLCAyLCAzfQ==">βοΈ</a><pre> <span class='Value'>a</span> <span class='Gets'>β</span> <span class='Number'>3</span> <span class='Separator'>,</span> <span class='Function'>β’</span> <span class='Value'>b</span> <span class='Gets'>β</span> <span class='Number'>2</span> +2 + + <span class='Number'>1</span> <span class='Separator'>,</span> <span class='Number'>2</span> <span class='Separator'>,</span> <span class='Number'>3</span> +3 + + <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 2 3 β© + + <span class='Brace'>{</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='Brace'>}</span> +3 +</pre> diff --git a/docs/help/strand.html b/docs/help/strand.html new file mode 100644 index 00000000..56d407f1 --- /dev/null +++ b/docs/help/strand.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: Undertie (`βΏ`)</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="undertie-"><a class="header" href="#undertie-">Undertie (<code><span class='Ligature'>βΏ</span></code>)</a></h1> +<h2 id="-strand"><a class="header" href="#-strand"><code><span class='Ligature'>βΏ</span></code>: Strand</a></h2> +<p>Create a list via <a href="../doc/arrayrepr.html#strands">strand notation</a>.</p> +<p>Placing <code><span class='Ligature'>βΏ</span></code> between valid BQN expressions will create a list out of the end results of those expressions.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MeKAvzLigL8zCgor4oC/LeKAvzU2">βοΈ</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> +β¨ 1 2 3 β© + + <span class='Function'>+</span><span class='Ligature'>βΏ</span><span class='Function'>-</span><span class='Ligature'>βΏ</span><span class='Number'>56</span> +β¨ + - 56 β© +</pre> diff --git a/docs/help/system.html b/docs/help/system.html new file mode 100644 index 00000000..ae887af1 --- /dev/null +++ b/docs/help/system.html @@ -0,0 +1,10 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Bullet (`β’`)</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="bullet-"><a class="header" href="#bullet-">Bullet (<code><span class='Value'>β’</span></code>)</a></h1> +<h2 id="-system"><a class="header" href="#-system"><code><span class='Value'>β’</span></code>: System</a></h2> +<p>A prefix for system functions. <code><span class='Value'>β’listSys</span></code> gives a list of system values added in any BQN implementation.</p> +<p><code><span class='Value'>β’</span></code> is ignored when determining the role of the system value.</p> diff --git a/docs/repl.js b/docs/repl.js index cf7a9071..fc097829 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -129,7 +129,7 @@ let setPrefix = () => { let c = Array.from(d)[1]; let t = d.slice(1+c.length).replace(';','\n'); let k = revkeys[c]; if (k) t += '\n'+prefix+(k==='"'?'"':k); - x.hashelp = i < 64; + x.hashelp = i < 64; // comment out after patch for double struck x.title = primhelp[c] = t; }); } diff --git a/help/2-modifierrightoperand.md b/help/2-modifierrightoperand.md new file mode 100644 index 00000000..a85a552a --- /dev/null +++ b/help/2-modifierrightoperand.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/2-modifierrightoperand.html).* + +# Mathematical Double-struck G (`πΎ`) + +## `πΎ`: 2-Modifier Right operand + +A variable assigned to the right operand of a 2-modifier block. `π` can be used to access the right operand as a value. + + 5 +{π}3 1
\ No newline at end of file diff --git a/help/README.md b/help/README.md index 2d6d3cf1..d7c505d2 100644 --- a/help/README.md +++ b/help/README.md @@ -2,28 +2,44 @@ # REPL Help +Symbols are listed in alphabetical order of page name, ignoring syntactical roles. + | Symbol | Link | |--------|------| +| `πΎ` | [2-Modifier Right operand](2-modifierrightoperand.md) | | `\|` | [Absolute Value, Modulus](absolutevalue_modulus.md) | | `β` | [Bind, After, Dyadic After](after_bind.md) | -| `!` | [Assert, Dyad](assert_assertwithmessage.md) | +| `!` | [Assert, Assert With Message](assert_assertwithmessage.md) | | `β` | [Atop, Dyadic Atop](atop.md) | | `βΈ` | [Bind Left, Before, Dyadic Before](before_bind.md) | +| `{` | [Begin Block](beginblock.md) | +| `(` | [Begin Expression](beginexpression.md) | +| `β¨` | [Begin list](beginlist.md) | | `β` | [Catch](catch.md) | | `β` | [Ceiling, Maximum](ceiling_maximum.md) | | `Λ` | [Cells](cells.md) | +| `β` | [Change](change.md) | | `βΆ` | [Choose](choose.md) | | `β` | [Classify, Index Of](classify_indexof.md) | +| `#` | [Comment](comment.md) | | `+` | [Conjugate, Add](conjugate_add.md) | | `Λ` | [Constant](constant.md) | +| `π` | [Current Function](currentfunction.md) | +| `π£` | [Current Modifier](currentmodifier.md) | | `β·` | [Deduplicate, Find](deduplicate_find.md) | +| `β` | [Define](define.md) | | `β‘` | [Depth, Match](depth_match.md) | | `β` | [Depth](depth.md) | | `β₯` | [Deshape, Reshape](deshape_reshape.md) | | `Β¨` | [Each](each.md) | | `<` | [Enclose, Lesser Than](enclose_lessthan.md) | +| `}` | [End Block](endblock.md) | +| `)` | [End Expression](endexpression.md) | +| `β©` | [End list](endlist.md) | | `β` | [Enlist, Pair](enlist_pair.md) | | `β` | [Exponential, Power](exponential_power.md) | +| `β` | [Export Definition, Export names](export.md) | +| `.` | [Namespace Field](field.md) | | `β` | [First Cell, Select](firstcell_select.md) | | `β` | [First, Pick](first_pick.md) | | `β` | [Floor, Minimum](floor_minimum.md) | @@ -35,16 +51,23 @@ | `β£` | [Identity, Left](identity_left.md) | | `β’` | [Identity, Right](identity_right.md) | | `/` | [Indices, Replicate](indices_replicate.md) | +| `β` | [Infinity](infinity.md) | | `Λ` | [Insert, Insert With initial](insert.md) | | `βΎ` | [Join, Join](join_jointo.md) | +| `π¨` | [Left Argument](leftargument.md) | | `β ` | [Length, Not Equal To](length_notequals.md) | | `β€` | [Lesser Than or Equal To](lessthanorequalto.md) | | `β` | [Unique Mask, Member Of](markfirst_memberof.md) | | `>` | [Merge, Greater Than](merge_greaterthan.md) | +| `Β―` | [Minus](minus.md) | +| `π½` | [Modifier Left operand](modifierleftoperand.md) | | `-` | [Negate, Subtract](negate_subtract.md) | +| `Β·` | [Nothing](nothing.md) | | `Β¬` | [Logical Not, Span](not_span.md) | +| `@` | [Null Character](nullcharacter.md) | | `β` | [Occurrence Count, Progressive Index Of](occurrencecount_progressiveindexof.md) | | `β` | [Atop, Over](over.md) | +| `Ο` | [Pi](pi.md) | | `β` | [Prefixes, Take](prefixes_take.md) | | `β` | [Range, Windows](range_windows.md) | | `=` | [Rank, Equal To](rank_equals.md) | @@ -52,8 +75,11 @@ | `Γ·` | [Reciprocal, Divide](reciprocal_divide.md) | | `β` | [Repeat](repeat.md) | | `β½` | [Reverse, Dyad](reverse_rotate.md) | +| `π©` | [Right Argument](rightargument.md) | | `` ` `` | [Scan, Scan With initial](scan.md) | | `Λ` | [Self, Swap](self_swap.md) | +| `,` | [Separator](separator1.md) | +| `β` | [Separator](separator.md) | | `β’` | [Shape, Not Match](shape_notmatch.md) | | `Β»` | [Shift After, Shift After](shiftafter.md) | | `Β«` | [Shift Before, Shift Before](shiftbefore.md) | @@ -62,7 +88,9 @@ | `β¨` | [Sort Down, Logical Or](sortdown_or.md) | | `β§` | [Sort Up, Logical And](sortup_and.md) | | `β` | [Square root, Root](squareroot_root.md) | +| `βΏ` | [Strand](strand.md) | | `β` | [Suffixes, Drop](suffixes_drop.md) | +| `β’` | [System](system.md) | | `β` | [Each](table.md) | | `β` | [Transpose, Reorder Axes](transpose_reorderaxes.md) | | `βΎ` | [Under](under.md) | diff --git a/help/assert_assertwithmessage.md b/help/assert_assertwithmessage.md index fc90b367..ad11a8d3 100644 --- a/help/assert_assertwithmessage.md +++ b/help/assert_assertwithmessage.md @@ -15,7 +15,7 @@ Throw an error if `π©` is not 1. -## `π¨ ! π©`: Dyad +## `π¨ ! π©`: Assert With Message Throw an error with message `π¨` if `π©` is not 1. diff --git a/help/beginblock.md b/help/beginblock.md new file mode 100644 index 00000000..df6d58be --- /dev/null +++ b/help/beginblock.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginblock.html).* + +# Left Curly Bracket (`{`) + +## `{ ...`: Begin Block + +Starts a block, which can be one of: + +- Function +- 1-Modifier +- 2-Modifier +- Namespace +- Immediate Block + +Must end with a corresponding `}`. + + {π¨ + π©} # Function + + {π¨βΏπ½βΏπ©} # 1-modifier + + {π¨βΏπ½βΏπΎβΏπ©} # 2-modifier + + {a β 5} # Namespace + + {5+4+6} # Immediate block
\ No newline at end of file diff --git a/help/beginexpression.md b/help/beginexpression.md new file mode 100644 index 00000000..8284e04f --- /dev/null +++ b/help/beginexpression.md @@ -0,0 +1,13 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginexpression.html).* + +# Left Parenthesis (`(`) + +## `( ...`: Begin Expression + +Starts an expression, and only one expression. Must end with a corresponding `)`. + +`(` gives higher precedence to the expression in it, and BQN will evaluate expressions in `()` first. + + 1 + 2 - 3 + + (1 + 2) - 3
\ No newline at end of file diff --git a/help/beginlist.md b/help/beginlist.md new file mode 100644 index 00000000..7f0a51c0 --- /dev/null +++ b/help/beginlist.md @@ -0,0 +1,16 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginlist.html).* + +# Mathematical Left Angle Bracket (`β¨`) + +## `β¨ ...`: Begin list + +Starts a list. Inner elements must be separated by `,` or `β`. +Lists can be nested in other lists. + +Must end with a corresponding `β©`. + + β¨1, 2, 3β© + + β¨+ β - β 56β© + +
\ No newline at end of file diff --git a/help/change.md b/help/change.md new file mode 100644 index 00000000..d44d0a66 --- /dev/null +++ b/help/change.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/change.html).* + +# Leftwards Arrow With Hook (`β`) + +## `n β© v`: Change + +Changes the value of variable with name `n` to value `v`. + +Variable `n` must already exist. + + a β© 1 + + β’ b β 3 + + β’ b β© "Be the change you wish to see in the world."
\ No newline at end of file diff --git a/help/comment.md b/help/comment.md new file mode 100644 index 00000000..25943a31 --- /dev/null +++ b/help/comment.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/comment.html).* + +# Number Sign (`#`) + +## `#`: Comment + +Create a comment that extends till the end of a line. + +Anything written in comments is ignored. + + + 1 + 2 # + 3 + 4 + + "Hello world!" # this is ignored!
\ No newline at end of file diff --git a/help/currentfunction.md b/help/currentfunction.md new file mode 100644 index 00000000..f2c5e16d --- /dev/null +++ b/help/currentfunction.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/currentfunction.html).* + +# Mathematical Double-struck S (`π`) + +## `π`: Current Function + +A variable assigned to the current function block. `π€` can be used to access the current function block as a value. + +`π` can be used for recursion. + + F β {π 0: 1; π© Γ π π©-1} # Factorial + F 5 + + {π€βΏπ€}4
\ No newline at end of file diff --git a/help/currentmodifier.md b/help/currentmodifier.md new file mode 100644 index 00000000..f76cc98a --- /dev/null +++ b/help/currentmodifier.md @@ -0,0 +1,10 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/currentmodifier.html).* + +# Mathematical Double-struck R (`π£`) + +## `π£`: Current Modifier + +A variable assigned to the current modifier block. Underscores must be added to the beginning and/or end (`_π£`, `_π£_`) to use the modifier with the correct role. + + + +{π£β£π©} 4
\ No newline at end of file diff --git a/help/define.md b/help/define.md new file mode 100644 index 00000000..b36b5fc0 --- /dev/null +++ b/help/define.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/define.html).* + +# Leftwards Arrow (`β`) + +## `n β v`: Define + +Defines a new variable with name `n` and value `v`. + +Variable `n` must not already exist. + + β’ a β 1 + + β’ b β 3βΏ3 β₯ 5 + + C β β
\ No newline at end of file diff --git a/help/endblock.md b/help/endblock.md new file mode 100644 index 00000000..a10aa907 --- /dev/null +++ b/help/endblock.md @@ -0,0 +1,17 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endblock.html).* + +# Right Curly Bracket (`}`) + +## `... }`: End Block + +Starts a block, which starts with `}`. See [Begin Block](beginblock.md) for more details. + + {π¨ + π©} # Function + + {π¨βΏπ½βΏπ©} # 1-modifier + + {π¨βΏπ½βΏπΎβΏπ©} # 2-modifier + + {a β 5} # Namespace + + {5+4+6} # Immediate block
\ No newline at end of file diff --git a/help/endexpression.md b/help/endexpression.md new file mode 100644 index 00000000..d65f6520 --- /dev/null +++ b/help/endexpression.md @@ -0,0 +1,12 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endexpression.html).* + +# Right Parenthesis (`)`) + +## `... )`: End Expression + +The closing symbol for `(`. See [Begin Expression](beginexpression.md) for more details. + + + 1 + 2 - 3 + + (1 + 2) - 3
\ No newline at end of file diff --git a/help/endlist.md b/help/endlist.md new file mode 100644 index 00000000..9d698dcc --- /dev/null +++ b/help/endlist.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endlist.html).* + +# Mathematical Right Angle Bracket (`β©`) + +## `... β©`: End list + +Ends a list started by a `β¨`. See [Begin List](beginlist.md) for more details. + + + β¨1, 2, 3β© + + β¨+ β - β 56β© + +
\ No newline at end of file diff --git a/help/export.md b/help/export.md new file mode 100644 index 00000000..39821667 --- /dev/null +++ b/help/export.md @@ -0,0 +1,19 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/export.html).* + +# Leftward Double Arrow (`β`) + +## `n β v`: Export Definition + +Define a variable with name `n` and export it from the current namespace or program's scope. + + ns β { exported β 5, unexported β 0} + ns.exported + ns.unexported + +## `π¨ β`: Export names + +Export the names given in `π©` from the current namespace or program's scope. Names must be defined. + + ns1 β { β¨alsoexportedβ©β, exported β 5, alsoexported β 0} + ns1.exported + ns1.alsoexported
\ No newline at end of file diff --git a/help/field.md b/help/field.md new file mode 100644 index 00000000..c866e0a8 --- /dev/null +++ b/help/field.md @@ -0,0 +1,11 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/field.html).* + +# Full Stop (`.`) + +## `ns . name`: Namespace Field + +Access a field with name `name` in namespace `ns`. Field must have been exported with `β`. + + {aβ1} . a + + {Fβ-}.F 5
\ No newline at end of file diff --git a/help/genhelp.bqn b/help/genhelp.bqn index cf50c939..b4a5b8c9 100755 --- a/help/genhelp.bqn +++ b/help/genhelp.bqn @@ -5,15 +5,17 @@ thing β { names β (β£βΎ", "βΎβ’)Β΄{(¬·β§`' 'βΈ=)βΈ/βΎβ½(2+β/':'=π©)βπ©}Β¨("## "β‘3βΈβ)Β¨βΈ/data tβΏd β βΎ/Β¨(βdata)=Β¨"()" sym β "`"βΎΛ"`"βΎ{'`':"` ` `"; '|':"\"βΎπ© ; π©}Β―3β2βdata - β’Show "| " βΎ sym βΎ " | [" βΎ names βΎ "]("βΎ((t+1)βdββdata)βΎ ") |" -}Β¨β’args + β’Show "| " βΎ sym βΎ " | [" βΎ names βΎ "]("βΎπ©βΎ ") |" +}Β¨β’args(Β¬ββ/β£)β¨"README.md"β© head β β¨ "*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).*" β¨β© "# REPL Help" β¨β© +"Symbols are listed in alphabetical order of page name, ignoring syntactical roles." +β¨β© "| Symbol | Link |" "|--------|------|" β© -"index.md.tmp" β’FLines head βΎ thing #rename once you have a proper file.
\ No newline at end of file +"README.md" β’FLines head βΎ thing #rename once you have a proper file.
\ No newline at end of file diff --git a/help/infinity.md b/help/infinity.md new file mode 100644 index 00000000..5ea6cb3f --- /dev/null +++ b/help/infinity.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/infinity.html).* + +# Infinity (`β`) + +## `β`: Infinity + +Mathematical constant Infinity. Shares the same status as other numbers, can be negative (`Β―β`). + + + β + + Β―β + + 1+β
\ No newline at end of file diff --git a/help/leftargument.md b/help/leftargument.md new file mode 100644 index 00000000..3b179335 --- /dev/null +++ b/help/leftargument.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/leftargument.html).* + +# Mathematical Double-struck W (`π¨`) + +## `π¨`: Left Argument + +A variable assigned to the left argument of a block. `π` can be used to access the left argument as a function. + + 5 {π¨} 1
\ No newline at end of file diff --git a/help/minus.md b/help/minus.md new file mode 100644 index 00000000..2d85e1e7 --- /dev/null +++ b/help/minus.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/minus.html).* + +# Macron (`Β―`) + +## `Β―`: Minus + +Prefix before numbers to indicate that they are negative. + +Note that this is not the same as `-`, since it is part of the number, rather than a primitive that negates its value. + + + -1βΏ2βΏ3 + + Β―1βΏ2βΏ3
\ No newline at end of file diff --git a/help/modifierleftoperand.md b/help/modifierleftoperand.md new file mode 100644 index 00000000..2f23d37f --- /dev/null +++ b/help/modifierleftoperand.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/modifierleftoperand.html).* + +# Mathematical Double-struck F (`π½`) + +## `π½`: Modifier Left operand + +A variable assigned to the left operand of a modifier block. `π` can be used to access the left operand as a value. + + 5 +{πβ£π¨} 1
\ No newline at end of file diff --git a/help/nothing.md b/help/nothing.md new file mode 100644 index 00000000..b5ef7fe3 --- /dev/null +++ b/help/nothing.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/nothing.html).* + +# Middle Dot (`Β·`) + +## `Β·`: Nothing + +### In Trains + +Nothing can serve as a left argument in a train to string together multiple monadic functions. + + (-+-) 5 + + (-Β·+-) 5 + +### In Block Headers + +For Block header pattern matching syntax, Nothing can be used to indicate an unused value. + + F β {π aβΏΒ·βΏb: aβΎb} + + F 1βΏ2βΏ3 + +
\ No newline at end of file diff --git a/help/nullcharacter.md b/help/nullcharacter.md new file mode 100644 index 00000000..b13eb3f0 --- /dev/null +++ b/help/nullcharacter.md @@ -0,0 +1,16 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/nullcharacter.html).* + +# Commercial At (`@`) + +## `@`: Null Character + +Null character, codepoint 0 in ASCII. Has the status of any other character. + +Can be added to any positive integer to get its character equivalent. + + + @+50 + + @ + + @+64
\ No newline at end of file diff --git a/help/pi.md b/help/pi.md new file mode 100644 index 00000000..0787e7ee --- /dev/null +++ b/help/pi.md @@ -0,0 +1,12 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/pi.html).* + +# Pi (`Ο`) + +## `Ο`: Pi + +Mathematical constant pi. Shares the same status as other numbers, can be negative (`Β―Ο`). + + + Ο + + Β―Ο
\ No newline at end of file diff --git a/help/rightargument.md b/help/rightargument.md new file mode 100644 index 00000000..69ec6394 --- /dev/null +++ b/help/rightargument.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/rightargument.html).* + +# Mathematical Double-struck X (`π©`) + +## `π©`: Right Argument + +A variable assigned to the right argument of a block. `π` can be used to access the right argument as a function. + + 5 {π©} 1
\ No newline at end of file diff --git a/help/separator.md b/help/separator.md new file mode 100644 index 00000000..9c02aa59 --- /dev/null +++ b/help/separator.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/separator.html).* + +# Diamond (`β`) + +## `β`: Separator + +Separates statements in blocksβ programs and arrays. + + a β 3 β β’ b β 2 + + 1 β 2 β 3 + + β¨1 β 2 β 3β© + + {1 β 2 β 3}
\ No newline at end of file diff --git a/help/separator1.md b/help/separator1.md new file mode 100644 index 00000000..90296f2f --- /dev/null +++ b/help/separator1.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/separator1.html).* + +# Comma (`,`) + +## `,`: Separator + +Separates statements in blocks, programs and arrays. + + a β 3 , β’ b β 2 + + 1 , 2 , 3 + + β¨1, 2, 3β© + + {1, 2, 3}
\ No newline at end of file diff --git a/help/strand.md b/help/strand.md new file mode 100644 index 00000000..9866f79b --- /dev/null +++ b/help/strand.md @@ -0,0 +1,16 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/strand.html).* + +# Undertie (`βΏ`) + +## `βΏ`: Strand + +Create a list via [strand notation](../doc/arrayrepr.md#strands). + +Placing `βΏ` between valid BQN expressions will create a list out of the end results of those expressions. + + + 1βΏ2βΏ3 + + +βΏ-βΏ56 + +
\ No newline at end of file diff --git a/help/system.md b/help/system.md new file mode 100644 index 00000000..79b1d745 --- /dev/null +++ b/help/system.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/system.html).* + +# Bullet (`β’`) + +## `β’`: System + +A prefix for system functions. `β’listSys` gives a list of system values added in any BQN implementation. + +`β’` is ignored when determining the role of the system value. |
