aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/functional.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-11-01 10:34:56 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-11-01 10:38:12 -0500
commit2fd3a7b32e554d021915ebbd3b6f00dd2b80ff16 (patch)
tree951c69ba7155b2f24ecb2021492020626fc80fbe /docs/doc/functional.html
parent5a82896551b33effc365abdf5c38662ce414540e (diff)
Recompile docs with new (more precise) dzaima/BQN number formatting
Diffstat (limited to 'docs/doc/functional.html')
-rw-r--r--docs/doc/functional.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/doc/functional.html b/docs/doc/functional.html
index 7debbe20..76dc6777 100644
--- a/docs/doc/functional.html
+++ b/docs/doc/functional.html
@@ -111,11 +111,11 @@
<p>Like any function, this one can be given a name and then called. A quirk of this way of defining a function is that it has a subject role (it's the result of the function <code><span class='Brace'>{</span><span class='Function'>π•Ž</span><span class='Modifier2'>∘</span><span class='Function'>𝕏</span><span class='Brace'>}</span><span class='Modifier'>Β΄</span></code>) and so must be defined with a lowercase name.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=Z2F1c3Mg4oaQIHvwnZWO4oiY8J2Vj33CtCDii4bigL8t4oC/KMOXy5wpCkdhdXNzIDI=">↗️</a><pre> <span class='Value'>gauss</span> <span class='Gets'>←</span> <span class='Brace'>{</span><span class='Function'>π•Ž</span><span class='Modifier2'>∘</span><span class='Function'>𝕏</span><span class='Brace'>}</span><span class='Modifier'>Β΄</span> <span class='Function'>⋆</span><span class='Ligature'>β€Ώ</span><span class='Function'>-</span><span class='Ligature'>β€Ώ</span><span class='Paren'>(</span><span class='Function'>Γ—</span><span class='Modifier'>˜</span><span class='Paren'>)</span>
<span class='Function'>Gauss</span> <span class='Number'>2</span>
-0.0183156388887342
+0.01831563888873418
</pre>
<p>Another, and probably more common, use of arrays of functions is to apply several different functions to one or more arguments. Here we apply three different functions to the number 9:</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+o4oiaLCAy4oq44oi+LCDiiqIt4ouG4p+pIHvwnZWO8J2VqX3CqCA5">↗️</a><pre> <span class='Bracket'>⟨</span><span class='Function'>√</span><span class='Separator'>,</span> <span class='Number'>2</span><span class='Modifier2'>⊸</span><span class='Function'>∾</span><span class='Separator'>,</span> <span class='Function'>⊒-⋆</span><span class='Bracket'>⟩</span> <span class='Brace'>{</span><span class='Function'>π•Ž</span><span class='Value'>𝕩</span><span class='Brace'>}</span><span class='Modifier'>Β¨</span> <span class='Number'>9</span>
-⟨ 3 ⟨ 2 9 ⟩ ¯8094.08392757538 ⟩
+⟨ 3 ⟨ 2 9 ⟩ ¯8094.083927575384 ⟩
</pre>
<p>The 2-modifier Choose (<code><span class='Modifier2'>β—Ά</span></code>) relies on arrays of functions to… function. It's very closely related to Pick <code><span class='Function'>βŠ‘</span></code>, and in fact when the left operand and the elements of the right operand are all data there's no real difference: Choose returns the constant function <code><span class='Value'>𝕗</span><span class='Function'>βŠ‘</span><span class='Value'>π•˜</span></code>.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=MuKXtiJhYmNkZWYiICJhcmci">↗️</a><pre> <span class='Number'>2</span><span class='Modifier2'>β—Ά</span><span class='String'>&quot;abcdef&quot;</span> <span class='String'>&quot;arg&quot;</span>