aboutsummaryrefslogtreecommitdiff
path: root/help/deduplicate_find.md
blob: bb8b4e57ff5f42f26fd32ba13b4522143de75c2e (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
28
29
30
31
32
33
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/deduplicate_find.html).*

# Epsilon Underbar (`⍷`)

## `⍷ 𝕩`: Deduplicate
[→full documentation](../doc/selfcmp.md#deduplicate)

Unique major cells of `𝕩`.

        ⍷ 4‿5‿6‿6‿4‿7‿5

        a ← 3‿3 ⥊ ↕6

        ⍷ a



## `𝕨 ⍷ 𝕩`: Find
[→full documentation](../doc/find.md)

Mark the top left location of the occurrences of `𝕨` in `𝕩` with a 1, and other locations with 0.

Result is the same shape as `(≢𝕨)↕x`.

        "string" ⍷ "substring"

        "loooooong" ⍷ "short"

        b ← 7 (4|⋆˜)⌜○↕ 9

        c ← (0‿3‿0≍0‿1‿0)

        c ⍷ b