Is there a way to stop the evaluation of an expression when the result of that expression would depend on the value of a Symbol?
f[g[x_]] := 2 g := 3 f[g] f f[g[x]] 2
Here I would like to halt the execution when it tries to apply
g-> 3 to
g[x] and fails.
Basically is there a way to make the evaluation of an expression and the replacement of its Symbols commutative?