let exists t ~f = try (iter t (fun x -> if f x then raise Not_found else ()); false) with Not_found -> true