]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/extlib/hExtlib.ml
helm_registry: added the pair unmarshaller
[helm.git] / helm / software / components / extlib / hExtlib.ml
index c0364315a62c018923f2c9e76873a35087c15fd2..d4572789ad55f39795d000fd09192e839cfee02f 100644 (file)
@@ -153,6 +153,17 @@ let rec filter_map f =
       | None -> filter_map f tl
       | Some v -> v :: filter_map f tl)
 
+let list_rev_map_filter f l =
+   let rec aux a = function
+      | []       -> a
+      | hd :: tl -> 
+         begin match f hd with
+           | None   -> aux a tl
+           | Some b -> aux (b :: a) tl 
+         end
+   in 
+   aux [] l
+
 let list_concat ?(sep = []) =
   let rec aux acc =
     function