aboutsummaryrefslogtreecommitdiff
path: root/doc/find.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/find.md')
-rw-r--r--doc/find.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/find.md b/doc/find.md
index 5309909f..6958365a 100644
--- a/doc/find.md
+++ b/doc/find.md
@@ -6,7 +6,7 @@ Find (`โท`) searches for occurrences of an array `๐•จ` within `๐•ฉ`. The resu
"xx" โท "xxbdxxxcx"
-More precisely `๐•จ` needs to [match](match.md) a contiguous selection from `๐•ฉ`, which for strings means a substring. These subarrays of `๐•ฉ` are also exactly the cells in the result of [Windows](windows.md). In fact we can use Windows to see all the arrays `๐•จ` will be compared against.
+More precisely, `๐•จ` needs to [match](match.md) a contiguous selection from `๐•ฉ`, which for strings means a substring. These subarrays of `๐•ฉ` are also exactly the cells in the result of [Windows](windows.md). So we can use Windows to see all the arrays `๐•จ` will be compared against.
2 โ†• "xxbdxxxcx"
@@ -18,7 +18,7 @@ Like Windows, the result usually doesn't have the same dimensions as `๐•ฉ`. Thi
"string" (โ‰ขโˆ˜โŠขโ†‘โท) "substring" # APL style
-If `๐•จ` is larger than `๐•ฉ`, the result is empty, and there's no error even in cases where Windows would fail. One place this tends to come up is when applying [First](pick.md#first) (`โŠ‘`) the result: `โŠ‘โท` tests whether `๐•จ` appears in `๐•ฉ` at the first position, that is, whether it's a prefix of `๐•ฉ`. If `๐•จ` is longer than `๐•ฉ` it shouldn't be a prefix. First will fail but using a [fold](fold.md) `0โŠฃยดโฅŠโˆ˜โท` instead gives a 0 in this case.
+If `๐•จ` is larger than `๐•ฉ`, the result is empty, and there's no error even in cases where Windows would fail. One place this tends to come up is when applying [First](pick.md#first) (`โŠ‘`) to the result: `โŠ‘โท` tests whether `๐•จ` appears in `๐•ฉ` at the first position, that is, whether it's a prefix of `๐•ฉ`. If `๐•จ` is longer than `๐•ฉ` it shouldn't be a prefix. First will fail but using a [fold](fold.md) `0โŠฃยดโท` instead gives a 0 in this case.
"loooooong" โท "short"
@@ -26,7 +26,7 @@ If `๐•จ` is larger than `๐•ฉ`, the result is empty, and there's no error even
0 โŠฃยด "loooooong" โท "short"
-This pattern also works in the high-rank case discussed below, testing whether `๐•จ` is a multi-dimensional prefix starting at the lowest-index corner of `๐•ฉ`.
+Adding a [Deshape](reshape.md#deshape) gives `0โŠฃยดโฅŠโˆ˜โท`, which works with the high-rank case discussed below. It tests whether `๐•จ` is a multi-dimensional prefix starting at the lowest-index corner of `๐•ฉ`.
### Higher ranks
@@ -36,6 +36,6 @@ If `๐•จ` and `๐•ฉ` are two-dimensional then Find does a two-dimensional search
(0โ€ฟ3โ€ฟ0โ‰0โ€ฟ1โ€ฟ0) โท a
-It's also allowed for `๐•จ` to have a smaller rank than `๐•ฉ`; in this case leading axes of `๐•ฉ` are mapped over so that axes of `๐•จ` correspond to trailing axes of `๐•ฉ`. This is a minor violation of the [leading axis](leading.md) principle, which would match axes of `๐•จ` to leading axes of `๐•ฉ` in order to make a function that's useful with the Rank operator, but such a function would be quite strange and hardly ever useful.
+It's also allowed for `๐•จ` to have a smaller rank than `๐•ฉ`; the axes of `๐•จ` then correspond to trailing axes of `๐•ฉ`, so that leading axes of `๐•ฉ` are mapped over. This is a minor violation of the [leading axis](leading.md) principle, which would match axes of `๐•จ` to leading axes of `๐•ฉ` in order to make a function that's useful with the Rank operator, but such a function would be quite strange and hardly ever useful.
0โ€ฟ1โ€ฟ0โ€ฟ1 โท a