let rec iter f a  =
  match a with
    | Var _ -> f a
    | App(_, l, _) -> List.iter (iter f) (App.args_of a)