Problem
Say I previously defined a variable (maybe through some extensive calculation)
thing = (a+x)y
Then, I want to use that expression elsewhere. In general, I can't just type "thing". For example, the following doesn't work
thingy[athingy[a_,y]y_] := NIntegrate[ thing ,{x,0,10}]
What I want
I want a way to use variables such that it always behaves like I copied and pasted its contents directly e.g. I want to type:
thingy[athingy[a_,y]y_] := NIntegrate[ Paste[thing] ,{x,0,10}]
and have it behave like:
thingy[athingy[a_,y]y_] := NIntegrate[ (a+x)y ,{x,0,10}]
Not just in this particular example, but in all use cases.
What I am not looking for
Making this use case work.
Yes, I know that I can fix it with:
thingy[a1_,y1_] := NIntegrate[ thing /. {a->a1,y->y1} ,{x,0,10}]
I'd like a built-in function, even if it behaves slightly differently from the way I described, rather than a hard-coded user-defined function (unless it's a very short).