while (true) { // This can't be an infinite loop because the set of possible states is bounded
const previousSize = nextStates.size;
[...f(nextStates, "").values()].forEach((s) => nextStates.add(s));
if (previousSize === nextStates.size) {
break;
}
}
Hi guys, will try more
sending test