I generate expressions such as
x x + x x.
How can I can turn these expressions to functions?
My current code simply returns the above expression and then I use different values for x[i]'s to evaluate it. It would be much better if I could return a function of x[i]'s instead, for example:
f[x_, x_, x_]:= x x + xx
Or even better to return a function of an array:
f[x_] := x[] x[] + x[] x[]