let list_itern f l =
  let rec aux n = function
    | h :: t -> f n h; aux (n + 1) t
    | [] -> ()
  in
    aux 0 l