diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-15 17:25:25 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-07-15 17:25:25 -0400 |
| commit | cc62bbae0f4e2eb6b20f04e31b2f222ee26ac670 (patch) | |
| tree | c30f19c5e895b90e57c08416289ab9565d457ec8 /docs | |
| parent | 15e09ac32169656c38a4a996994477cc661caa7b (diff) | |
Editing
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/doc/search.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/doc/search.html b/docs/doc/search.html index e24a3b3c..a44c3fc0 100644 --- a/docs/doc/search.html +++ b/docs/doc/search.html @@ -219,7 +219,7 @@ </pre> <p>For Member of, the equivalent is <code><span class='Function'>∊</span><span class='Modifier2'>⟜</span><span class='Value'>stuff</span><span class='Modifier2'>⌾</span><span class='Function'><</span></code>.</p> <h2 id="higher-ranks">Higher ranks</h2> -<p>So far we've shown set functions acting on lists. Well, and one example with a unit array slipped into the last section. In fact, if the searched-in array is a list, then the searched-for argument can have any rank.</p> +<p>So far we've shown search functions acting on lists. Well, and one example with a unit array slipped into the last section. In fact, if the searched-in array is a list, then the searched-for argument can have any rank.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=KCJoaWdoIuKJjSJyYW5rIikg4oiKICJsaXN0IGFyZyI=">↗️</a><pre> <span class='Paren'>(</span><span class='String'>"high"</span><span class='Function'>≍</span><span class='String'>"rank"</span><span class='Paren'>)</span> <span class='Function'>∊</span> <span class='String'>"list arg"</span> ┌─ ╵ 0 1 1 0 @@ -234,7 +234,7 @@ 3 3 ┘ </pre> -<p>But the seached-in argument doesn't have to be a list either! It can also be an array of higher rank. Rank 0 isn't allowed: if you want to "search" a unit, you're probably just looking for <a href="match.html">match</a>.</p> +<p>But the searched-in argument doesn't have to be a list either! It can also be an array of higher rank. Rank 0 isn't allowed: if you want to "search" a unit, you're probably just looking for <a href="match.html">match</a>.</p> <p>The searched-in argument is treated as a list of its major cells. It's the rank of these major cells—let's call this rank <code><span class='Value'>c</span></code>—that determines how the searched-for argument is treated. That argument must have rank <code><span class='Value'>c</span></code> or more, and it's treated as an array of <code><span class='Value'>c</span></code>-cells. For example, if the left argument to <code><span class='Function'>⊐</span></code> is a rank-2 table, then each 1-cell (row) of <code><span class='Value'>𝕩</span></code> is searched for independently, yielding one number in the result: a 0-cell.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIHJvd3Mg4oaQID4icm93IuKAvyJyaG8i4oC/InJvdyLigL8icnVlIgoKcm93cyDiipAgPiJyb3ci4oC/InJvdyLigL8iY29sIuKJjSJyaG8i4oC/ImNvdyLigL8iY29sIg==">↗️</a><pre> <span class='Function'>⊢</span> <span class='Value'>rows</span> <span class='Gets'>←</span> <span class='Function'>></span><span class='String'>"row"</span><span class='Ligature'>‿</span><span class='String'>"rho"</span><span class='Ligature'>‿</span><span class='String'>"row"</span><span class='Ligature'>‿</span><span class='String'>"rue"</span> ┌─ |
