diff options
Diffstat (limited to 'docs/doc/block.html')
| -rw-r--r-- | docs/doc/block.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/doc/block.html b/docs/doc/block.html index 40de8ab2..a31d33f3 100644 --- a/docs/doc/block.html +++ b/docs/doc/block.html @@ -166,9 +166,9 @@ </pre> <p>Unlike these assignments, the header also constrains what inputs the block can take: a monadic 1-modifier like the one above can't take a right operand or left argument, and consequently its body can't contain <code><span class='Function'>𝔾</span></code> or <code><span class='Value'>𝕨</span></code>. Calling it with a left argument, or a right argument that isn't a two-element list, will result in an error.</p> <h3 id="destructuring"><a class="header" href="#destructuring">Destructuring</a></h3> -<p>Arguments, but not operands, allow destructuring like assignment does. While assignment only tolerates lists of variables, header destructuring also allows constants. The argument must match the given structure, including the constants where they appear, or an error results.</p> -<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=RGVzdHJ1Y3Qg4oaQIHsg8J2ViiBh4oC/MeKAv+KfqGIsMuKfqTogYeKJjWIgfQpEZXN0cnVjdCAgICAgICA14oC/MeKAv+KfqDcsMuKfqQ==">↗️</a><pre> <span class='Function'>Destruct</span> <span class='Gets'>←</span> <span class='Brace'>{</span> <span class='Function'>𝕊</span> <span class='Value'>a</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Bracket'>⟨</span><span class='Value'>b</span><span class='Separator'>,</span><span class='Number'>2</span><span class='Bracket'>⟩</span><span class='Head'>:</span> <span class='Value'>a</span><span class='Function'>≍</span><span class='Value'>b</span> <span class='Brace'>}</span> - <span class='Function'>Destruct</span> <span class='Number'>5</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Bracket'>⟨</span><span class='Number'>7</span><span class='Separator'>,</span><span class='Number'>2</span><span class='Bracket'>⟩</span> +<p>Arguments and operands allow <a href="expression.html#destructuring">destructuring</a> like assignment does. While assignment only tolerates lists of variables, header destructuring also allows constants. The argument must match the given structure, including the constants where they appear, or an error results.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=RGVzdHJ1Y3Qg4oaQIHsg8J2ViiBh4oC/MeKAv+KfqGIswrcsMuKfqTogYeKJjWIgfQpEZXN0cnVjdCAgICAgICA14oC/MeKAv+KfqDcsz4AsMuKfqQ==">↗️</a><pre> <span class='Function'>Destruct</span> <span class='Gets'>←</span> <span class='Brace'>{</span> <span class='Function'>𝕊</span> <span class='Value'>a</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Bracket'>⟨</span><span class='Value'>b</span><span class='Separator'>,</span><span class='Nothing'>·</span><span class='Separator'>,</span><span class='Number'>2</span><span class='Bracket'>⟩</span><span class='Head'>:</span> <span class='Value'>a</span><span class='Function'>≍</span><span class='Value'>b</span> <span class='Brace'>}</span> + <span class='Function'>Destruct</span> <span class='Number'>5</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Bracket'>⟨</span><span class='Number'>7</span><span class='Separator'>,</span><span class='Number'>π</span><span class='Separator'>,</span><span class='Number'>2</span><span class='Bracket'>⟩</span> ⟨ 5 7 ⟩ </pre> <h3 id="special-names-in-headers"><a class="header" href="#special-names-in-headers">Special names in headers</a></h3> |
