aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-07-12 12:28:25 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-07-12 12:28:25 -0400
commitde0b28520bc7bb65459db17c7451f808f6ef4e3e (patch)
treefb222cb8799015f9ab572ad42289e20f867f73f2
parent1d45d5be707cc22c1168c9b2b6631238bb1811d9 (diff)
Tweak Indices example to avoid {š•©/1āŒ½š•©} interpretation
-rw-r--r--doc/replicate.md2
-rw-r--r--docs/doc/replicate.html4
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/replicate.md b/doc/replicate.md
index b096ae62..7dd23e13 100644
--- a/doc/replicate.md
+++ b/doc/replicate.md
@@ -97,7 +97,7 @@ If `š•Ø` is `⟨⟩`, then it has depth 1, but is handled with the multidimensi
The monadic form of `/` is much simpler than the dyadic one, with no multidimensional case or mismatched argument ranks. `š•©` has to be a list of natural numbers, and `/š•©` is the list `š•©/ā†•ā‰ š•©`. Its elements are the [indices](indices.md) for `š•©`, with index `i` repeated `iāŠ‘š•©` times.
- / 3‿0‿1‿2
+ / 3‿0‿2‿1
A unit argument isn't allowed, and isn't very useful: for example, `/6` might indicate an array of six zeros, but this can be written `/ℊ6` or `6ℊ0` with hardly any extra effort.
diff --git a/docs/doc/replicate.html b/docs/doc/replicate.html
index f3fce857..1e1fabc5 100644
--- a/docs/doc/replicate.html
+++ b/docs/doc/replicate.html
@@ -174,8 +174,8 @@
</pre>
<h2 id="indices"><a class="header" href="#indices">Indices</a></h2>
<p>The monadic form of <code><span class='Function'>/</span></code> is much simpler than the dyadic one, with no multidimensional case or mismatched argument ranks. <code><span class='Value'>š•©</span></code> has to be a list of natural numbers, and <code><span class='Function'>/</span><span class='Value'>š•©</span></code> is the list <code><span class='Value'>š•©</span><span class='Function'>/↕≠</span><span class='Value'>š•©</span></code>. Its elements are the <a href="indices.html">indices</a> for <code><span class='Value'>š•©</span></code>, with index <code><span class='Value'>i</span></code> repeated <code><span class='Value'>i</span><span class='Function'>āŠ‘</span><span class='Value'>š•©</span></code> times.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=LyAz4oC/MOKAvzHigL8y">ā†—ļø</a><pre> <span class='Function'>/</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>2</span>
-⟨ 0 0 0 2 3 3 ⟩
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=LyAz4oC/MOKAvzLigL8x">ā†—ļø</a><pre> <span class='Function'>/</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>1</span>
+⟨ 0 0 0 2 2 3 ⟩
</pre>
<p>A unit argument isn't allowed, and isn't very useful: for example, <code><span class='Function'>/</span><span class='Number'>6</span></code> might indicate an array of six zeros, but this can be written <code><span class='Function'>/ℊ</span><span class='Number'>6</span></code> or <code><span class='Number'>6</span><span class='Function'>ℊ</span><span class='Number'>0</span></code> with hardly any extra effort.</p>
<p>When <code><span class='Value'>š•Ø</span></code> has rank 1, <code><span class='Value'>š•Ø</span><span class='Function'>/</span><span class='Value'>š•©</span></code> is equivalent to <code><span class='Value'>š•Ø</span><span class='Function'>/</span><span class='Modifier2'>⊸</span><span class='Function'>āŠ</span><span class='Value'>š•©</span></code>. Of course, this isn't the only use of Indices. It also gets along well with <a href="group.html">Group</a>: for example, <code><span class='Function'>/</span><span class='Modifier2'>⊸</span><span class='Function'>āŠ”</span></code> groups <code><span class='Value'>š•©</span></code> according to a list of lengths <code><span class='Value'>š•Ø</span></code>.</p>