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 | |
| parent | 15e09ac32169656c38a4a996994477cc661caa7b (diff) | |
Editing
| -rw-r--r-- | doc/search.md | 4 | ||||
| -rw-r--r-- | docs/doc/search.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/search.md b/doc/search.md index 159ba2f6..2e85c69d 100644 --- a/doc/search.md +++ b/doc/search.md @@ -143,7 +143,7 @@ For Member of, the equivalent is `∊⟜stuff⌾<`. ## Higher ranks -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. +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. ("high"≍"rank") ∊ "list arg" @@ -151,7 +151,7 @@ Member of and Index of compute each result number independently, so only the sha 4‿4‿4 ⊒ 3‿2⥊4 -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 [match](match.md). +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 [match](match.md). 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 `c`—that determines how the searched-for argument is treated. That argument must have rank `c` or more, and it's treated as an array of `c`-cells. For example, if the left argument to `⊐` is a rank-2 table, then each 1-cell (row) of `𝕩` is searched for independently, yielding one number in the result: a 0-cell. 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> ┌─ |
