find

From The K Language Wiki
Revision as of 06:43, 20 July 2021 by Razetime (talk | contribs) (add find page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Find
x&y

The find primitive is used to find the index of an atom y in array x. It returns 0N if the element is not found.

Find is right atomic.

 "XYZ"?"XYXZB"
0 1 0 2 0N
 5 8 5?56 8 1 5
0N 1 0N 0