X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fextlib%2FhExtlib.ml;h=fe587e297c50b5631d992852e12b2ae9bc84486c;hb=67dd51c6c9ceb0186490033d77769d49404964ac;hp=0d7254c8bd48cd34b8374e11f6c224d3620213a8;hpb=4b5527a6ccbe73ada47f903292959ed3dde3b5c6;p=helm.git diff --git a/helm/software/components/extlib/hExtlib.ml b/helm/software/components/extlib/hExtlib.ml index 0d7254c8b..fe587e297 100644 --- a/helm/software/components/extlib/hExtlib.ml +++ b/helm/software/components/extlib/hExtlib.ml @@ -27,7 +27,7 @@ (** PROFILING *) -let profiling_enabled = ref true ;; (* ComponentsConf.profiling *) +let profiling_enabled = ref false ;; (* ComponentsConf.profiling *) let something_profiled = ref false @@ -140,6 +140,14 @@ let flatten_map f l = List.flatten (List.map f l) ;; +let list_mapi f l = + let rec aux k = function + | [] -> [] + | h::tl -> f h k :: aux (k+1) tl + in + aux 0 l +;; + let rec list_uniq ?(eq=(=)) = function | [] -> [] | h::[] -> [h]