From 19d4e4da6a93deb398f87bb6b42b1b1ee3c4926e Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 15 Feb 2021 20:52:54 -0500 Subject: =?UTF-8?q?Give=20an=20empty=20result,=20not=20an=20error,=20whene?= =?UTF-8?q?ver=20=F0=9D=95=A8=20is=20longer=20than=20=F0=9D=95=A9=20in=20F?= =?UTF-8?q?ind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/spec/primitive.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/spec/primitive.html') 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 @@
  • Index of (โА) gives the smallest index of a principal argument cell that matches the cell, or โ‰ ๐•จ if there is no such cell.
  • Progressive Index of (โŠ’) 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 โ‰ ๐•จ is returned for a given cell if there is no valid cell.
  • -

    Find (โท) indicates positions where ๐•จ appears as a contiguous subarray of a =๐•จ-cell of ๐•ฉ. It has one result element for each such subarray of ๐•ฉ, whose value is 1 if that subarray matches ๐•ฉ and 0 otherwise.

    +

    Find (โท) indicates positions where ๐•จ appears as a contiguous subarray of a =๐•จ-cell of ๐•ฉ. It has one result element for each such subarray of ๐•ฉ, whose value is 1 if that subarray matches ๐•ฉ and 0 otherwise. Find cannot result in an error unless the rank of ๐•จ is higher than that of ๐•ฉ. If ๐•จ is longer along one axis than the corresponding trailing axis of ๐•ฉ, then the result has length 0 along that axis. Any atom argument to Find is automatically enclosed.

    Sorting

    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.

    Sort (โˆงโˆจ) 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).

    -- cgit v1.2.3