aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/block.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-29 21:03:34 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-29 21:03:34 -0500
commit80de67787aa1a7e186c7f3358ec4b45741f15ff5 (patch)
tree58bbce5e97d8990721d60a0cd992a2a8c73beced /docs/doc/block.html
parentfb3580660898306105c2e1f041f29bbdb9006210 (diff)
Remove → from docs and REPL
Diffstat (limited to 'docs/doc/block.html')
-rw-r--r--docs/doc/block.html5
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/doc/block.html b/docs/doc/block.html
index 491fd87d..5e957e1e 100644
--- a/docs/doc/block.html
+++ b/docs/doc/block.html
@@ -181,7 +181,7 @@
</span><span class='Brace'>{</span> <span class='Modifier'>_𝕣</span><span class='Value'>:</span> <span class='Comment'># 1-Modifier
</span><span class='Brace'>{</span> <span class='Modifier2'>_𝕣_</span><span class='Value'>:</span> <span class='Comment'># 2-Modifier
</span></pre>
-<p>For immediate blocks, this is the only type of header possible, and it must use an identifier as there is no applicable special name. However, this name can't be used, except for <a href="#returns">returns</a>: it doesn't make sense to refer to a value while it is still being computed!</p>
+<p>For immediate blocks, this is the only type of header possible, and it must use an identifier as there is no applicable special name. However, the name can't be used: it doesn't make sense to refer to a value while it is still being computed!</p>
<h2 id="multiple-bodies"><a class="header" href="#multiple-bodies">Multiple bodies</a></h2>
<p>Blocks that define functions and deferred modifiers can include more than one body, separated by semicolons <code><span class='Value'>;</span></code>. The body used for a particular evaluation is chosen based on the arguments the the block. One special case applies when there are exactly two bodies either without headers or with labels only: in this case, the first applies when there is one argument and the second when there are two.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=QW1iaXYg4oaQIHsg4p+oMSzwnZWp4p+pIDsg4p+oMizwnZWoLPCdlanin6kgfQpBbWJpdiAnYScKJ2EnIEFtYml2ICdiJw==">↗️</a><pre> <span class='Function'>Ambiv</span> <span class='Gets'>←</span> <span class='Brace'>{</span> <span class='Bracket'>⟨</span><span class='Number'>1</span><span class='Separator'>,</span><span class='Value'>𝕩</span><span class='Bracket'>⟩</span> <span class='Value'>;</span> <span class='Bracket'>⟨</span><span class='Number'>2</span><span class='Separator'>,</span><span class='Value'>𝕨</span><span class='Separator'>,</span><span class='Value'>𝕩</span><span class='Bracket'>⟩</span> <span class='Brace'>}</span>
@@ -242,6 +242,3 @@ ERROR
ERROR
</pre>
<p>This is the main drawback of predicates relative to guards in APL dfns (also written with <code><span class='Value'>?</span></code>), while the advantage is that it allows multiple expressions, or extra conditions, after a <code><span class='Value'>?</span></code>. It's not how I would have designed it if I just wanted to make a syntax for if statements, but it's a natural fit for the header system.</p>
-<h2 id="returns"><a class="header" href="#returns">Returns</a></h2>
-<p><em>This feature is not yet included in any BQN implementation.</em></p>
-<p>The glyph <code><span class='Gets'>→</span></code> indicates an early return from a block. It must be preceded either by one of the self-reference special names <code><span class='Function'>𝕊</span></code> or <code><span class='Value'>𝕣</span></code> or by an internal name for a containing block. The combination of name and return token—like <code><span class='Function'>F</span><span class='Gets'>→</span></code>, let's say—is a function that returns from the current instance of the indicated block. If that instance has already returned, then it instead results in an error.</p>