let rec iter f a =
match a with
| Term.App((Sym.Arith(op), _), al, _) ->
(match op, al with
| Sym.Num _, [] -> ()
| Sym.Multq _, [b] -> iter f b
| Sym.Add, bl -> List.iter (iter f) bl
| _ -> f a)
| _ ->
f a