diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-07-12 12:28:25 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-07-12 12:28:25 -0400 |
| commit | de0b28520bc7bb65459db17c7451f808f6ef4e3e (patch) | |
| tree | fb222cb8799015f9ab572ad42289e20f867f73f2 | |
| parent | 1d45d5be707cc22c1168c9b2b6631238bb1811d9 (diff) | |
Tweak Indices example to avoid {š©/1ā½š©} interpretation
| -rw-r--r-- | doc/replicate.md | 2 | ||||
| -rw-r--r-- | docs/doc/replicate.html | 4 |
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> |
