Reuse code for evaluating boolean expressions