diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-07-14 20:06:50 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-07-14 20:06:50 -0400 |
| commit | e2b07a5fd0bbaad232c717fb90a31d6c61d72bd4 (patch) | |
| tree | 8cd1d594838a87f4257e73d1e0e32d69ec4a148c /docs/doc/expression.html | |
| parent | fe13f4a775a83073cb44d8e47ec4fdf9ec957bed (diff) | |
Try to include previous variable definitions in REPL links
Diffstat (limited to 'docs/doc/expression.html')
| -rw-r--r-- | docs/doc/expression.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/expression.html b/docs/doc/expression.html index b8f9254c..f8c40256 100644 --- a/docs/doc/expression.html +++ b/docs/doc/expression.html @@ -234,7 +234,7 @@ ⟨ ⟨ 1 0 ⟩ ⟨ 1 1 ⟩ ⟨ 1 2 ⟩ ⟩ </pre> <p>Namespace destructuring uses an overlapping syntax, fully described in <a href="namespace.html#imports">its own section</a>. The left hand side is a list of names, or aliases <code><span class='Value'>to</span><span class='Gets'>⇐</span><span class='Value'>from</span></code>.</p> -<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ceKAv3Ig4oapIHtx4oeQMity4oeQMC41fSDii4QgcQ==">↗️</a><pre> <span class='Value'>q</span><span class='Ligature'>‿</span><span class='Value'>r</span> <span class='Gets'>↩</span> <span class='Brace'>{</span><span class='Value'>q</span><span class='Gets'>⇐</span><span class='Number'>2</span><span class='Function'>+</span><span class='Value'>r</span><span class='Gets'>⇐</span><span class='Number'>0.5</span><span class='Brace'>}</span> <span class='Separator'>⋄</span> <span class='Value'>q</span> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oceKAv3Isc+KfqSDihpAg4p+oInFyIizihpU04p+pCnHigL9yIOKGqSB7ceKHkDIrcuKHkDAuNX0g4ouEIHE=">↗️</a><pre> <span class='Value'>q</span><span class='Ligature'>‿</span><span class='Value'>r</span> <span class='Gets'>↩</span> <span class='Brace'>{</span><span class='Value'>q</span><span class='Gets'>⇐</span><span class='Number'>2</span><span class='Function'>+</span><span class='Value'>r</span><span class='Gets'>⇐</span><span class='Number'>0.5</span><span class='Brace'>}</span> <span class='Separator'>⋄</span> <span class='Value'>q</span> 2.5 </pre> <p>With destructuring, you might want to discard some values from the right hand side rather than assign them any name. There's special syntax for this: use Nothing (<code><span class='Nothing'>·</span></code>) for a placeholder non-name in the appropriate position, like <code><span class='Nothing'>·</span><span class='Ligature'>‿</span><span class='Value'>y</span><span class='Ligature'>‿</span><span class='Nothing'>·</span> <span class='Gets'>←</span> <span class='Value'>list</span></code>.</p> |
