Evaluate a function at an algebraic expression (#342)