Add function to accumulate values over types appearing inside a value/declaration/binder.