remvalue, was: Strange plot2d behaviour (correction)



On 1/1/07, Richard Fateman <fateman at cs.berkeley.edu> wrote:

> sanitize(f):=block([subl:[],
>                     s:apply(fundef,[f])],
>    subl:map(lambda([r],r=?gensym()),substpart("[",part(s,1),0)),
>    apply(define, [subst(subl,part(s,1)),
>                  subst(subl,part(s,2)) ]))
>
>
> Here is another program that is often equivalent:
>
> sanitize2(s):=( s:apply(fundef,[s]),
>   ev(subst(map(lambda([r],r=?gensym()),substpart("[",part(s,1),0)),s)))

Another substitution function that could be useful here is buildq.

HTH
Robert