]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/lib/cps.ml
new intermediate language complete_rg,
[helm.git] / helm / software / helena / src / lib / cps.ml
index f993ffb049cef6f3930a8da3a60822b2935bd517..0ce60a8f02afd9b80c3993081d839ffee57cf704 100644 (file)
@@ -20,6 +20,10 @@ let rec list_sub_strict f l1 l2 = match l1, l2 with
    | _ :: tl1, _ :: tl2 -> list_sub_strict f tl1 tl2
    | _                  -> assert false
 
+let rec list_fold f map a = function
+   | []       -> f a
+   | hd :: tl -> list_fold f map (map a hd) tl
+
 (* this is not tail recursive *)
 let rec list_fold_left f map a = function
    | []       -> f a