aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/leading.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-07 22:16:01 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-07 22:16:01 -0400
commitbed78fe6147cb7921b7367960d406d28d37cb019 (patch)
tree5fd5f3ad00bfbd66b19aabc4a3d688815754be1e /docs/doc/leading.html
parent07be54d8179ba799cc55dacd2c79fb2292477030 (diff)
The editing is going to end at some point isn't it?
Diffstat (limited to 'docs/doc/leading.html')
-rw-r--r--docs/doc/leading.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/leading.html b/docs/doc/leading.html
index 9b3b408d..b3b008c8 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, of an <a href="array.html">array</a> 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 <a href="rank.html">Rank modifier</a> 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"><a class="header" href="#monadic-functions">Monadic functions</a></h2>
<h3 id="manipulating-cells"><a class="header" href="#manipulating-cells">Manipulating cells</a></h3>
-<p>Most monadic functions that deal with structure at all (that is, not arithmetic) work only on the first axis of the argument. Usually, they treat it as a list of its <a href="array.html#cells">major cells</a>. The function <a href="shape.html">Length</a> (<code><span class='Function'>≠</span></code>) counts these major cells, while <a href="prefixes.html">Prefixes</a> (<code><span class='Function'>↑</span></code>), Suffixes (<code><span class='Function'>↓</span></code>), <a href="reverse.html">Reverse</a> (<code><span class='Function'>⌽</span></code>), and <a href="select.html">First Cell</a> (<code><span class='Function'>⊏</span></code>) move them around. The <a href="fold.html#insert">Insert</a> (<code><span class='Modifier'>˝</span></code>) and <a href="scan.html">Scan</a> (<code><span class='Modifier'>`</span></code>) modifiers also yield functions that work along the first axis; <a href="fold.html">Fold</a> (<code><span class='Modifier'>´</span></code>) requires <code><span class='Value'>𝕩</span></code> to be a list but does go along the first (only) axis of that list.</p>
+<p>Most monadic functions that deal with structure at all (that is, not arithmetic) work only on the first axis of the argument. Usually, they treat it as a list of its <a href="array.html#cells">major cells</a>. The function <a href="shape.html">Length</a> (<code><span class='Function'>≠</span></code>) counts these major cells, while <a href="prefixes.html">Prefixes</a> (<code><span class='Function'>↑</span></code>), Suffixes (<code><span class='Function'>↓</span></code>), <a href="reverse.html">Reverse</a> (<code><span class='Function'>⌽</span></code>), and <a href="select.html#first-cell">First Cell</a> (<code><span class='Function'>⊏</span></code>) move them around. The <a href="fold.html#insert">Insert</a> (<code><span class='Modifier'>˝</span></code>) and <a href="scan.html">Scan</a> (<code><span class='Modifier'>`</span></code>) modifiers also yield functions that work along the first axis; <a href="fold.html">Fold</a> (<code><span class='Modifier'>´</span></code>) requires <code><span class='Value'>𝕩</span></code> to be a list but does go along the first (only) axis of that list.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGEg4oaQIDPigL8yIOKliiAiYWJjZGVmIiAgIyBBbiBhcnJheSB3aXRoIHRocmVlIG1ham9yIGNlbGxzCgriio8gYSAgICAgICAgICAgICAgICAgICAjIEdldCB0aGUgZmlyc3QgbWFqb3IgY2VsbAoK4oy9IGEgICAgICAgICAgICAgICAgICAgIyBSZXZlcnNlIHRoZSBjZWxscwoK4oqjYCBhICAgICAgICAgICAgICAgICAgIyBSZXBsaWNhdGUgdGhlIGZpcnN0IGNlbGw=">↗️</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'>&quot;abcdef&quot;</span> <span class='Comment'># An array with three major cells
</span>┌─
╵"ab