Evaluate function for primitives and some built-in functions.