]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/extlib/hExtlib.ml
thanks to the fact that we convert well typed term and that
[helm.git] / helm / software / components / extlib / hExtlib.ml
index 2f388c0b5e83bbad8ca5359f2d0d936d7aedeb38..c16b11159c38ccde56621da9d3b9c97c611419c9 100644 (file)
@@ -155,6 +155,15 @@ let rec list_iter_default2 f l1 def l2 =
     | a::ta, [] -> f a def; list_iter_default2 f ta def [] 
 ;;
 
+let rec list_forall_default3 f l1 l2 def l3 = 
+  match l1,l2,l3 with
+    | [], [], _ -> true
+    | [], _, _
+    | _, [], _ -> raise (Invalid_argument "list_forall_default3")
+    | a::ta, b::tb, c::tc -> f a b c && list_forall_default3 f ta tb def tc
+    | a::ta, b::tb, [] -> f a b def && list_forall_default3 f ta tb def [] 
+;;
+
 let sharing_map f l =
   let unchanged = ref true in
   let rec aux b = function
@@ -506,3 +515,8 @@ let chop_prefix prefix s =
 let touch s =
   try close_out(open_out s) with Sys_error _ -> ()
 ;;
+
+let rec mk_list x = function
+  | 0 -> []
+  | n -> x :: mk_list x (n-1)
+;;