]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/extlib/hExtlib.ml
fixed undo support for coercions inside records
[helm.git] / helm / ocaml / extlib / hExtlib.ml
index a0f9d8d6cbb1ab0295b65035f873c724e6668d5d..99e6609ec27efed198c8ba68bfa34f0f6b069199 100644 (file)
@@ -134,6 +134,16 @@ let list_concat ?(sep = []) =
     | hd :: tl -> aux ([sep; hd] @ acc) tl
   in
   aux []
+  
+let rec list_findopt f l = 
+  let rec aux = function 
+    | [] -> None 
+    | x::tl -> 
+        (match f x with
+        | None -> aux tl
+        | Some _ as rc -> rc)
+  in
+  aux l
 
 (** {2 File predicates} *)