How to use CompletableFuture without risking a StackOverflowError?
问题 I want to walk the search space of an asynchronous function. I coded the logic as follows: /** * Assuming that a function maps a range of inputs to the same output value, minimizes the input value while * maintaining the output value. * * @param previousInput the last input known to return {@code target} * @param currentInput the new input value to evaluate * @param function maps an input to an output value * @param target the expected output value * @return the minimum input value that