# Pure function slot delivery [duplicate]

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:)

• This is doable, e.g. 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 to a and b and then using a ReplaceAll or something? – b3m2a1 Aug 1 '17 at 3:03
• Looks like a duplicate: 142072, do you agree? – Kuba Aug 1 '17 at 5:21