diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-18 17:53:37 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-18 17:53:37 -0400 |
| commit | 7e0e38bd155fab76fa3b6776f9184611d044903d (patch) | |
| tree | 9cbd13e8aae249cb97b1dd2b22a084817093890c /docs/doc/block.html | |
| parent | bbecd676b7c127fead3ef172bbae3ddf2fb7f19a (diff) | |
Finish lexical scope documentation
Diffstat (limited to 'docs/doc/block.html')
| -rw-r--r-- | docs/doc/block.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/block.html b/docs/doc/block.html index eb57da8d..cd124aa9 100644 --- a/docs/doc/block.html +++ b/docs/doc/block.html @@ -12,7 +12,7 @@ <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> 16 </pre> -<p>Because they use <a href="https://en.wikipedia.org/wiki/Scope_(computer_science)#Lexical_scoping">lexical scoping</a>, blocks can also be used to encapsulate code. If a block uses only variables that it initializes, then it has no dependence on its environment and would work the same way if defined anywhere. But it can also use external variables, defined in a containing block.</p> +<p>Because they use <a href="lexical.html">lexical scoping</a>, blocks can also be used to encapsulate code. If a block uses only variables that it initializes, then it has no dependence on its environment and would work the same way if defined anywhere. But it can also use external variables, defined in a containing block.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=YeKGkGLihpAib3V0ZXIiCnsgYeKGkCJpbm5lciIg4ouEIGHigL9iIH0=">↗️</a><pre> <span class='Value'>a</span><span class='Gets'>←</span><span class='Value'>b</span><span class='Gets'>←</span><span class='String'>"outer"</span> <span class='Brace'>{</span> <span class='Value'>a</span><span class='Gets'>←</span><span class='String'>"inner"</span> <span class='Separator'>⋄</span> <span class='Value'>a</span><span class='Ligature'>‿</span><span class='Value'>b</span> <span class='Brace'>}</span> ⟨ "inner" "outer" ⟩ |
