diff options
Diffstat (limited to 'docs/doc/leading.html')
| -rw-r--r-- | docs/doc/leading.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/leading.html b/docs/doc/leading.html index 9a9b522b..de9ea039 100644 --- a/docs/doc/leading.html +++ b/docs/doc/leading.html @@ -8,7 +8,7 @@ <p>Several primitive functions manipulate the right argument, or sometimes both arguments, along one or more axes. According to the <a href="https://aplwiki.com/wiki/Leading_axis_theory">leading axis model</a>, it's best to make the primitives operate on initial axes, because the Rank modifier then allows it to apply to later axes as well. Here we'll see how this pattern works in BQN.</p> <h2 id="monadic-functions">Monadic functions</h2> <h3 id="manipulating-cells">Manipulating cells</h3> -<p>Most non-scalar monadic functions work only on the first axis of the argument—that is, they treat it as a list of its major cells. The function Length (<code><span class='Function'>≠</span></code>) counts these major cells, while Prefixes (<code><span class='Function'>↑</span></code>), Suffixes (<code><span class='Function'>↓</span></code>), Reverse (<code><span class='Function'>⌽</span></code>), and First Cell (<code><span class='Function'>⊏</span></code>) move them around. The Insert (<code><span class='Modifier'>˝</span></code>) and Scan (<code><span class='Modifier'>`</span></code>) modifiers also yield functions that work along the first axis; in contrast, Reduce (<code><span class='Modifier'>´</span></code>) requires its argument to be a list, as it works on elements.</p> +<p>Most non-arithmetic monadic functions work only on the first axis of the argument—that is, they treat it as a list of its major cells. The function Length (<code><span class='Function'>≠</span></code>) counts these major cells, while Prefixes (<code><span class='Function'>↑</span></code>), Suffixes (<code><span class='Function'>↓</span></code>), Reverse (<code><span class='Function'>⌽</span></code>), and First Cell (<code><span class='Function'>⊏</span></code>) move them around. The Insert (<code><span class='Modifier'>˝</span></code>) and Scan (<code><span class='Modifier'>`</span></code>) modifiers also yield functions that work along the first axis; in contrast, Reduce (<code><span class='Modifier'>´</span></code>) requires its argument to be a list, as it works on elements.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGEg4oaQIDPigL8yIOKliiAiYWJjZGVmIiAgIyBBbiBhcnJheSB3aXRoIHRocmVlIG1ham9yIGNlbGxzCuKKjyBhICAgICAgICAgICAgICAgICAgICMgR2V0IHRoZSBmaXJzdCBtYWpvciBjZWxsCuKMvSBhICAgICAgICAgICAgICAgICAgICMgUmV2ZXJzZSB0aGUgY2VsbHMK4oqjYCBhICAgICAgICAgICAgICAgICAgIyBSZXBsaWNhdGUgdGhlIGZpcnN0IGNlbGw=&run">↗️</a><pre> <span class='Function'>⊢</span> <span class='Value'>a</span> <span class='Gets'>←</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>2</span> <span class='Function'>⥊</span> <span class='String'>"abcdef"</span> <span class='Comment'># An array with three major cells </span>┌─ ╵"ab |
