public final Object evaluate()

in core/src/main/java/org/apache/commons/functor/core/algorithm/RecursiveEvaluation.java [64:78]


    public final Object evaluate() {
        Object result = null;
        // if the function returns another function, execute it. stop executing
        // when the result is not of the expected type.
        while (true) {
            result = function.evaluate();
            if (functionType.isInstance(result)) {
                function = (NullaryFunction<?>) result;
                continue;
            } else {
                break;
            }
        }
        return result;
    }