aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/control.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-23 22:49:20 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-23 22:49:20 -0400
commita717221a7dd2fb88ff9d5d07e221a83dc558b47d (patch)
tree0b3ceb6ca130ea5f9dccd706ddb72368a71bd924 /docs/doc/control.html
parent4cc1cb8d7b34eb99d77fd35a53797e6929b348f7 (diff)
Update list notation links
Diffstat (limited to 'docs/doc/control.html')
-rw-r--r--docs/doc/control.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/control.html b/docs/doc/control.html
index ad6c65f8..9dc6e2a8 100644
--- a/docs/doc/control.html
+++ b/docs/doc/control.html
@@ -185,7 +185,7 @@
<span class='Brace'>}</span>
</pre>
<p>The initialization can be a simple expression as shown; in fact it's a little silly to make initialization one of the arguments to <code><span class='Function'>For</span></code> at all.Unlike in C, it's impossible to declare a variable that's local to the whole <code><span class='Function'>For</span></code> loop but not its surroundings. Hopefully this is obvious from the structure of the code! Only curly braces can create a new scope, so to localize some variables in the <code><span class='Function'>For</span></code> loop, just surround it in an extra set of curly braces.</p>
-<p>The <code><span class='Function'>While</span></code> loop alone allows syntax similar to the <code><span class='Function'>For</span></code> loop. Perform any initialization outside of the loop, and compose the post-action with the main body using the reverse composition <code><span class='Brace'>{</span><span class='Function'>𝔾</span><span class='Modifier2'>∘</span><span class='Function'>𝔽</span><span class='Brace'>}</span></code>. Because the composition binds less tightly than stranding, the bracketed list notation has to be used here.</p>
+<p>The <code><span class='Function'>While</span></code> loop alone allows syntax similar to the <code><span class='Function'>For</span></code> loop. Perform any initialization outside of the loop, and compose the post-action with the main body using the reverse composition <code><span class='Brace'>{</span><span class='Function'>𝔾</span><span class='Modifier2'>∘</span><span class='Function'>𝔽</span><span class='Brace'>}</span></code>. Because the composition binds less tightly than stranding, the bracketed <a href="arrayrepr.html#brackets">list notation</a> has to be used here.</p>
<pre><span class='Value'>c</span><span class='Gets'>←</span><span class='Number'>27</span> <span class='Separator'>⋄</span> <span class='Value'>n</span><span class='Gets'>←</span><span class='Number'>0</span>
<span class='Function'>While</span> <span class='Bracket'>⟨</span><span class='Brace'>{</span><span class='Value'>𝕤</span><span class='Separator'>⋄</span><span class='Number'>1</span><span class='Function'>&lt;</span><span class='Value'>c</span><span class='Brace'>}</span><span class='Separator'>,</span> <span class='Brace'>{</span><span class='Value'>𝕤</span><span class='Separator'>⋄</span><span class='Value'>n</span><span class='Function'>+</span><span class='Gets'>↩</span><span class='Number'>1</span><span class='Brace'>}{</span><span class='Function'>𝔾</span><span class='Modifier2'>∘</span><span class='Function'>𝔽</span><span class='Brace'>}{</span><span class='Value'>𝕤</span>
<span class='Function'>Match</span> <span class='Paren'>(</span><span class='Number'>2</span><span class='Function'>|</span><span class='Value'>c</span><span class='Paren'>)</span><span class='Ligature'>‿</span><span class='Brace'>{</span>