private boolean shouldExecute(final Function existingFunction, final Function newFunction) {
        if (existingFunction.getPriority() > newFunction.getPriority()) {
            return true;
        }
        if (existingFunction.getPriority() == newFunction.getPriority() &&
                existingFunction.getAssociativity() == Function.Associativity.Left) {
            return true;
        }
        return false;
    }