let exists (f : 'e -> bool) (s : 'e hashset) : bool = try iter (fun x -> if f x then raise Exists) s; false with Exists -> true