srecord noeq BStackComputeAllWithPrintStruct(VStack.Computable f) { settable int maxBacktracks = 10; settable int maxStepsPerBacktrack = 10; gettable new L results; BStack stack; L get() { // Make a stack with our computation stack = new BStack(f); repeat maxBacktracks { // Get first or next result of function A result = stack.nextResultWithPrintStruct(maxStepsPerBacktrack); results.add(result); print("Result: " + result); // Ask the stack to backtrack to get another result stack = stack.backtrack(); // If there is no more result, print message and exit if (stack == null) { print("No further result"); break; } // There is another result, so continue loop } ret results; } }