Evaluating composite functions using tables