implement op function for evaluating s-expression functions