Given a function f[x , y].
The definition of f is not self-describing. (f was defined with objects other than f.)
Then I want to construct a function g[x] such that
f[x,y] and g[x][y] are the same, and the definition of g does not contain f.
For example, given
In[1] f[x_, y_] := x^2 + y^3
I've tried
In[2] g[x_]:=f[x,#]&
Checked an example
In[3] f[3,2] == 17 == g[3][2]
Out[3] True
Looks okay so far but
In[4] Definition[g]
Out[4] g[x_] := f[x, #1] &
The definition of g contains f. (fail)
What I want is a function h such that
In[4] Definition[h]
Out[4] x^2+#1^3&
I've tried Evaluate/Activate/FullSimplify, to g, but not worked.
Can you construct a function let's say, ToOperator, such that ToOperator[f] wil produce h ?
(ToOperator produces a warning message if the definition of f is self-describing. The generalization of ToOperator will be of course, multiple variable function as input + user choose some of those variables)