What is the best way to search a nested array like this for the first appearance of 2 2 2 in each vector? Are there special functions in APL to avoid searching the entire vector?
?10/¨10⍴2
(1 1 2 2 1 1 2 1 1 2) (1 2 1 2 1 1 1 1 1 1) (1 2 1 2 2 2 2 2 2 2) (1 1 2 2 1 1 2 1 1 2) (1 2 1 2 1 1 1 1 1 1) (1 2 1 2 2 2 2 2 2 2) (1 1 2 2 1 1 2 1 1 2) (1 2 1 2 1 1 1 1 1 1) (1 2 1 2 2 2 2 2 2 2) (1 2 1 2 1 1 1 1 1 1)
Index position for the first 2 2 2 or a 0 if not present for a 10 item array.