How do I create a function from an expression

Please see the post for intention (I am her colleague):

I am starting a new thread because I think eval is not the way out since it’s too restrictive to support local scope.