| _ :: 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