diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-07 20:41:31 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-07 20:41:31 -0400 |
| commit | 7bf2aa4054b8378a76dff63acdccbcdad91f68e6 (patch) | |
| tree | 1bff7a2a2b11fa259bc80722fdcb0609768c7718 /doc/find.md | |
| parent | 532796eb397c8374e0546de9e4ab70c2955349f3 (diff) | |
BREAKING: Don't allow First of empty or reshaping empty to non-empty
Diffstat (limited to 'doc/find.md')
| -rw-r--r-- | doc/find.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/find.md b/doc/find.md index b91a5930..5309909f 100644 --- a/doc/find.md +++ b/doc/find.md @@ -18,13 +18,13 @@ 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) (`โ`) 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, so 0 is appropriate. +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. "loooooong" โท "short" 9 โ "short" - โ "loooooong" โท "short" + 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 `๐ฉ`. |
