Sanitize is not fool proof (yet) .Sanitize2 seems to work as advertized.
Subject: Sanitize is not fool proof (yet) .Sanitize2 seems to work as advertized.
From: Michel Van den Bergh
Date: Tue, 02 Jan 2007 22:27:19 +0100
>
> Blindly substituting in f(x):= (globalx: 'x, otherfun(z):= x, lambda([r],x)
> ...) are all ways that allow the gensym to "escape" and gets us back to
> the previous situation.
>
> The "right" solution is to recognize free and bound instances of x in the
> function body.
>
> RJF
Am I right that gensym substitution for x can be done safely if x does
not appear in a non evaluated
argument to some function?
The following seems safe
f(x):=(define(otherfun(z),x))
since define evaluates its second argument.
Michel