aboutsummaryrefslogtreecommitdiff
path: root/docs/tutorial/combinator.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-01-08 21:47:53 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-01-08 21:47:53 -0500
commit6a256ca9562cd593b68e312c3c4de5146272db04 (patch)
tree18c524be0a9682c70a294d25e4b551797387a3dd /docs/tutorial/combinator.html
parent2475f5cf1ff153ef119fa1ee19dceacc4a70e137 (diff)
Span hasn't been introduced yet!
Diffstat (limited to 'docs/tutorial/combinator.html')
-rw-r--r--docs/tutorial/combinator.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tutorial/combinator.html b/docs/tutorial/combinator.html
index 2724cc25..d9e159ae 100644
--- a/docs/tutorial/combinator.html
+++ b/docs/tutorial/combinator.html
@@ -485,7 +485,7 @@
</g>
</svg>
-<p>What about the one-argument case? The structure of application is exactly the same, except that there's only one argument available, so it's used in both input positions. If I describe it that way, it sounds like lazy design, but the ability to use one argument in two ways makes the one-argument versions of Before and After even more useful than the two-argument ones. For example, consider the function <code><span class='Value'>y</span> <span class='Function'>=</span> <span class='Value'>x</span><span class='Function'>×</span><span class='Paren'>(</span><span class='Number'>1</span><span class='Function'>-</span><span class='Value'>x</span><span class='Paren'>)</span></code>, which gives a parabola that's equal to 0 at 0 and 1, and peaks between them when x is 0.5. Remembering that Span (<code><span class='Function'>¬</span></code>) is defined so that <code><span class='Function'>¬</span><span class='Value'>x</span></code> is <code><span class='Number'>1</span><span class='Function'>-</span><span class='Value'>x</span></code>, we can write this function as either <code><span class='Function'>¬</span><span class='Modifier2'>⊸</span><span class='Function'>×</span></code> or <code><span class='Function'>×</span><span class='Modifier2'>⟜</span><span class='Function'>¬</span></code>.</p>
+<p>What about the one-argument case? The structure of application is exactly the same, except that there's only one argument available, so it's used in both input positions. If I describe it that way, it sounds like lazy design, but the ability to use one argument in two ways makes the one-argument versions of Before and After even more useful than the two-argument ones. For example, consider the function <code><span class='Value'>y</span> <span class='Function'>=</span> <span class='Value'>x</span><span class='Function'>×</span><span class='Paren'>(</span><span class='Number'>1</span><span class='Function'>-</span><span class='Value'>x</span><span class='Paren'>)</span></code>, which gives a parabola that's equal to 0 at 0 and 1, and peaks between them when x is 0.5. The function Not (<code><span class='Function'>¬</span></code>, which we'll discuss in a later tutorial) is defined so that <code><span class='Function'>¬</span><span class='Value'>x</span></code> is <code><span class='Number'>1</span><span class='Function'>-</span><span class='Value'>x</span></code>, which conveniently allows us to write this function as either <code><span class='Function'>¬</span><span class='Modifier2'>⊸</span><span class='Function'>×</span></code> or <code><span class='Function'>×</span><span class='Modifier2'>⟜</span><span class='Function'>¬</span></code>.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=wqziirjDlyAwLjU=">↗️</a><pre> <span class='Function'>¬</span><span class='Modifier2'>⊸</span><span class='Function'>×</span> <span class='Number'>0.5</span>
0.25
</pre>