I have a nested expression like this one
expr = Tan[Sin[Cos[x]]];
I can deconstruct it with
sym = Cases[Level[expr, -1, Heads -> True], _Symbol]
{Tan, Sin, Cos, x}
How can I put it together again? The only way I found is
ToExpression @ StringJoin @ Most @ Flatten @
Transpose[{ToString /@ sym, Table["@", {Length @ sym}]}]
Tan[Sin[Cos[x]]]
Is there a way to do this without using String - functions?

Compositioninstead. That doesn't stop me from using these "retired" functions when I learn about them. I am also a fan ofToHeldExpression. – Mr.Wizard Oct 09 '14 at 17:26