How to automate a laborous task (via Metaprogramming? Need to access variables of the current working space)

Thanks for insisting on the fact that I can use functions:

I finally realized that I have to build the expression like that:

f = :($x_1*$x_2+z*inv($x_3))

With this expression and the use of MacroTools.postwalk, I was able to construct the functions I need.

(Up to now I always used f = :(x_1*x_2+z*inv(x_3)).)

1 Like