static class Confirm extends Status { O responder; // must contain an answer function *() {} *(O *responder) {} S answer(S s) { status(null); // always forget question after one line if (isYes(s)) ret callAnswerMethod(responder, s); else if (isNo(s)) ret "OK, cancelled"; null; } } static S confirm(S msg, O responder) { status(new Confirm(responder)); ret msg; }