let find a pred = let rec iter i = if i >= a.length then raise Not_found else if pred a.data.(i) = 0 then i else iter (i + 1) in iter 0