∊ — Enlist / Member

Function. Keys: Alt-e. Hanzi: 属/展 (屬/展). Ranks: ∞ monadic, ∞ ∞ dyadic

∊Y gives the vector of every atom in Y, at any depth.

∊[[1 2] 3 [4 5]]    ⍝ 1 2 3 4 5

X∊Y marks each cell of X found among the major cells of Y, using tolerant matching. The cells of X have the rank of a major cell of Y. An atom on the right acts as a one-item vector. Against a vector, each item of X is one query. A single query returns an atom. Otherwise the result has the leading axes of X.

1 2 3∊2 4          ⍝ $f $t $f
"banana"∊"an"       ⍝ $f $t $t $t $t $t
C←"cat" "dog"
⊂"dog" ∊ C         ⍝ $t
["dog"]∊C          ⍝ [$t]

Against a matrix, each row of X is one query.

m←[10 20◇30 40]
30 40∊m            ⍝ $t
[30 40◇50 60]∊m  ⍝ $t $f

Errors