X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fhelena%2Fsrc%2Flib%2Fcps.ml;h=0ce60a8f02afd9b80c3993081d839ffee57cf704;hb=e880d6eab5e1700f4a625ddcd7d0fa8f0cce2dcc;hp=f993ffb049cef6f3930a8da3a60822b2935bd517;hpb=95872555aaa040a22ad2d93cb1278f79e20da70c;p=helm.git diff --git a/helm/software/helena/src/lib/cps.ml b/helm/software/helena/src/lib/cps.ml index f993ffb04..0ce60a8f0 100644 --- a/helm/software/helena/src/lib/cps.ml +++ b/helm/software/helena/src/lib/cps.ml @@ -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