diff options
Diffstat (limited to 'docs/spec')
| -rw-r--r-- | docs/spec/primitive.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/spec/primitive.html b/docs/spec/primitive.html index eb51fd5f..5b850b6a 100644 --- a/docs/spec/primitive.html +++ b/docs/spec/primitive.html @@ -152,7 +152,7 @@ <li><strong>Index of</strong> (<code><span class='Function'>โ</span></code>) gives the smallest index of a principal argument cell that matches the cell, or <code><span class='Function'>โ </span><span class='Value'>๐จ</span></code> if there is no such cell.</li> <li><strong>Progressive Index of</strong> (<code><span class='Function'>โ</span></code>) processes non-principal cells in ravel order, and gives the smallest index of a principal argument cell that matches the cell that hasn't already been included in the result. Again <code><span class='Function'>โ </span><span class='Value'>๐จ</span></code> is returned for a given cell if there is no valid cell.</li> </ul> -<p><strong>Find</strong> (<code><span class='Function'>โท</span></code>) indicates positions where <code><span class='Value'>๐จ</span></code> appears as a contiguous subarray of a <code><span class='Function'>=</span><span class='Value'>๐จ</span></code>-cell of <code><span class='Value'>๐ฉ</span></code>. It has one result element for each such subarray of <code><span class='Value'>๐ฉ</span></code>, whose value is 1 if that subarray matches <code><span class='Value'>๐ฉ</span></code> and 0 otherwise.</p> +<p><strong>Find</strong> (<code><span class='Function'>โท</span></code>) indicates positions where <code><span class='Value'>๐จ</span></code> appears as a contiguous subarray of a <code><span class='Function'>=</span><span class='Value'>๐จ</span></code>-cell of <code><span class='Value'>๐ฉ</span></code>. It has one result element for each such subarray of <code><span class='Value'>๐ฉ</span></code>, whose value is 1 if that subarray matches <code><span class='Value'>๐ฉ</span></code> and 0 otherwise. Find cannot result in an error unless the rank of <code><span class='Value'>๐จ</span></code> is higher than that of <code><span class='Value'>๐ฉ</span></code>. If <code><span class='Value'>๐จ</span></code> is longer along one axis than the corresponding trailing axis of <code><span class='Value'>๐ฉ</span></code>, then the result has length 0 along that axis. Any atom argument to Find is automatically enclosed.</p> <h3 id="sorting">Sorting</h3> <p>Sorting functions are those that depend on BQN's array ordering. There are three kinds of sorting function, with two functions of each kind: one with an upward-pointing glyph that uses an ascending ordering (these function names are suffixed with "Up"), and one with a downward-pointing glyph and the reverse, descending, ordering ("Down"). Below, these three kinds of function are described, then the ordering rules. Except for the right argument of Bins, all arguments must have rank at least 1.</p> <p><strong>Sort</strong> (<code><span class='Function'>โงโจ</span></code>) reorders the major cells of its argument so that a major cell with a lower index comes earlier in the ordering than a major cell with a higher index, or matches it. If it's possible for matching arrays to differ in behavior because of different (including undefined versus defined) fill elements, then these arrays must maintain their ordering (a stable sort is required).</p> |
