aboutsummaryrefslogtreecommitdiff
path: root/docs/doc
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-10-10 07:35:25 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-10-10 07:35:25 -0400
commite39f04be68554be8bb188d489d3d61fb978cbdd0 (patch)
tree5830848e8b36559c894b2e4b6b5c1d6458ddb307 /docs/doc
parent0ebe9ea698213413f2652ab587e3953e0206b356 (diff)
Make description match example
Diffstat (limited to 'docs/doc')
-rw-r--r--docs/doc/block.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/block.html b/docs/doc/block.html
index 72aaecfd..a1446e75 100644
--- a/docs/doc/block.html
+++ b/docs/doc/block.html
@@ -214,7 +214,7 @@ ERROR
</pre>
<p>These case-style headers function exactly the same as if they were preceded by <code><span class='Function'>𝕊</span></code>, and can be mixed with other kinds of headers.</p>
<h3 id="predicates"><a class="header" href="#predicates">Predicates</a></h3>
-<p>Destructuring with a header is quite limited, only allowing matching structure and data with exact equality. A predicate, written with <code><span class='Value'>?</span></code>, allows you to test an arbitrary property before evaluating the rest of the body, and also serves as a limited kind of control flow. It can be thought of as an extension to a header, so that for example the following function requires the argument to have a single element and for that element to be less than zero before using the first body <code><span class='Number'>1</span><span class='Function'>+</span><span class='Value'>𝕩</span></code>. Otherwise it moves to the next one, an unconditional <code><span class='Value'>𝕩</span></code>.</p>
+<p>Destructuring with a header is quite limited, only allowing matching structure and data with exact equality. A predicate, written with <code><span class='Value'>?</span></code>, allows you to test an arbitrary property before evaluating the rest of the body, and also serves as a limited kind of control flow. It can be thought of as an extension to a header, so that for example the following function requires the argument to have two elements and for the first to be less than the second before using the first body. Otherwise it moves to the next body, which is unconditional.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=Q2hlY2tQYWlyIOKGkCB7IPCdlYrin6hhLGLin6k6IGE8Yj8gIm9rIiA7ICJub3Qgb2siIH0KCkNoZWNrUGFpciDin6gzLDjin6kgICAgIyBGYWlscyBkZXN0cnVjdHVyaW5nCkNoZWNrUGFpciDin6gxLDQsNeKfqSAgIyBOb3QgYSBwYWlyCkNoZWNrUGFpciDin6gzLMKvMeKfqSAgICMgTm90IGFzY2VuZGluZw==">↗️</a><pre> <span class='Function'>CheckPair</span> <span class='Gets'>←</span> <span class='Brace'>{</span> <span class='Function'>𝕊</span><span class='Bracket'>⟨</span><span class='Value'>a</span><span class='Separator'>,</span><span class='Value'>b</span><span class='Bracket'>⟩</span><span class='Value'>:</span> <span class='Value'>a</span><span class='Function'>&lt;</span><span class='Value'>b?</span> <span class='String'>&quot;ok&quot;</span> <span class='Value'>;</span> <span class='String'>&quot;not ok&quot;</span> <span class='Brace'>}</span>
<span class='Function'>CheckPair</span> <span class='Bracket'>⟨</span><span class='Number'>3</span><span class='Separator'>,</span><span class='Number'>8</span><span class='Bracket'>⟩</span> <span class='Comment'># Fails destructuring