Commit 78f52c74 authored by bguillaum's avatar bguillaum

back to ocaml < 3.12 compatibility

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@7428 7838e531-6607-4d57-9587-6c381814729c
parent 3e2172d4
......@@ -483,11 +483,26 @@ module Massoc_make (Ord: OrderedType) = struct
| Not_found -> (* no key i *) t
| List_.Not_disjoint -> raise Duplicate
(* New implementation of exists but exists fct not implemented in ocaml < 3.12 *)
(*
let exists fct t =
M.exists
(fun key list ->
List.exists (fun elt -> fct key elt) list
) t
*)
exception True
let exists fct t =
try
M.iter
(fun key list ->
if List.exists (fun elt -> fct key elt) list
then raise True
) t;
false
with True -> true
end (* module Massoc_make *)
(* ================================================================================ *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment