Re: how to rename variables?



Giovanni Gherdovich wrote:
Hello.

I wonder if I can find in Prolog a build-in predicate
that allow me to rename all the variables in a list
of terms in order to make these terms to don't
share variables.

Something that behaves like this:

?- rename([X+Y, f(X,g(X))], OutputList).

OutputList = [X1+X2, f(X3,g(X3))]

Try copy_term/2.

Cheers

Bart Demoen
.