p-e-w/savage

Variable substitution should be performed only once, not on each evaluation step

p-e-w opened this issue · 0 comments

p-e-w commented

The current implementation can cause infinite loops and infinite recursion, for example with this input:

f(x) = x
f(x)

The problem here is that the substituted expression is itself a variable with the same identifier as the variable it is substituted for, so substitution continues forever.