diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-11-01 10:34:56 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-11-01 10:38:12 -0500 |
| commit | 2fd3a7b32e554d021915ebbd3b6f00dd2b80ff16 (patch) | |
| tree | 951c69ba7155b2f24ecb2021492020626fc80fbe /docs/doc/functional.html | |
| parent | 5a82896551b33effc365abdf5c38662ce414540e (diff) | |
Recompile docs with new (more precise) dzaima/BQN number formatting
Diffstat (limited to 'docs/doc/functional.html')
| -rw-r--r-- | docs/doc/functional.html | 4 |
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'>"abcdef"</span> <span class='String'>"arg"</span> |
