blob: a9f4f4e89ff93e7ae043e23dd78e0162366c2f73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/classify_indexof.html).*
# Square Original Of (`⊐`)
## `⊐ 𝕩`: Classify
First index of each major cell of `𝕩` in `𝕩`.
⊐ 5‿6‿2‿2‿5‿1
a ← 3‿3 ⥊ 0‿1‿2‿9‿0‿9‿0‿1‿2
⊐ a
## `𝕨 ⊐ 𝕩`: Index Of
First index of each major cell of `𝕩` in `𝕨`. Rank of `𝕩` must be at least cell rank of 𝕨`.
If a cell is not found in `𝕨`, that position will contain the length of `𝕨` (`≠𝕨`).
5‿6‿2‿2‿5‿1 ⊐ 5‿2‿1‿6
b ← 3‿3 ⥊ 0‿1‿2‿9‿0‿9‿0‿1‿2
b ⊐ ⟨9‿0‿9⟩
|