let rec fold_left f accu l =
  match l with
    | [] -> accu
    | a::l -> fold_left f (f accu a) l