let f hd = list_rev_map_append f map ~tail:(hd :: tail) tl in
map f hd
+let rec forall2 f map l1 l2 = match l1, l2 with
+ | [], [] -> f true
+ | hd1 :: tl1, hd2 :: tl2 ->
+ let f b = if b then forall2 f map tl1 tl2 else f false in
+ map f hd1 hd2
+ | _ -> f false
+
let list_rev_append f =
list_rev_map_append f (fun f t -> f t)