This question is hard to phrase and even harder to google. Maybe it's best to explain it with a very simple example.
squareList = # # & /@ Range[10]
totalRoot = Sqrt[Total[squareList]]
Now I want to apply some kind of function to totalRoot
to get the following:
Sqrt[Total[# # & /@ Range[10]]]
Hopefully you understand what I mean. I'll try to put it into words. I want a function that, given a variable or an expression, returns an expression equivalent to it, but written only using built in functions. Basically, it would substitute back any variable declaration.
In case anyone is interest in why I need this, it's because it makes it easier to share the code of very simple programs. I am still a beginner when it comes to Mathematica so I tend to write all my programs in little steps, declaring a variable for each one.