How do I create a function from an expression

Sadly that’s not I want.

  1. expr=:(sin(x)+cos(x)) is not constructed by hand. It’s returned symbolic calculation.
  2. I don’t want eval since eval always acts on global scope, which limits the possibility of using it inside a function.