Another novice problem encountered. I am going to need a cardiology surgery. :(
For a simple example,
a = #1 &;
b = #2 &;
f = a^2 + b^2;
f
results in
(#1 &)^2 + (#2 &)^2
However, my goal is
(#1 )^2 + (#2 )^2
I know it can be done as
f=(#1)^2+(#2)^2
But still, substitution is necessary in my work, which means the step of a
and b
cant be neglected.
So what do I miss? Thanks:)
f = Evaluate[a[#^2] + b[Null,#2^2]]&
, but the fact that things have gotten so messy for something so simple is a sign that you're approaching whatever you want to do in the wrong way. What's wrong with not binding anything toa
andb
and then using aReplaceAll
or something? $\endgroup$