]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/src/lib/cps.ml
- the connections between the intermediate language and the "bag"
[helm.git] / helm / software / lambda-delta / src / lib / cps.ml
index 10ec62376b6d84a19e0fe5074f8a15bb8cb9fc08..f993ffb049cef6f3930a8da3a60822b2935bd517 100644 (file)
@@ -71,6 +71,11 @@ let rec list_fold_right f map l a = match l with
    | []       -> f a
    | hd :: tl -> list_fold_right (map f hd) map tl a
 
+let rec list_fold_right2 f map l1 l2 a = match l1, l2 with
+   | [], []                 -> f a
+   | hd1 :: tl1, hd2 :: tl2 -> list_fold_right2 (map f hd1 hd2) map tl1 tl2 a
+   | _                      -> failwith "Cps.list_fold_right2"
+
 let list_map f map l =
    let map f hd a = 
       let f hd = f (hd :: a) in map f hd