!752 static Action lastAction; concepts. concept History { new RefL events; } abstract concept Input { } Input > TextInput { S line; *() {} *(S *line) { change(); } } abstract concept Action { Bool good; // true, false or null } Action > NoAction {} Action > PrintAction { S text; *() {} *(S *text) { change(); } } static History historyObj() { ret uniq(History); } static L history() { ret historyObj().events; } static void historyAdd(Concept event) { historyObj().events.add(event); } p-awt { concepts(); showControls(jcenteredLine( jbutton("Good!", "good"), jbutton("Bad!", "bad"))); makeBot(); } synchronized answer { historyAdd(new TextInput(s)); if "hello" { S answer = "Hello!"; historyAdd(new PrintAction(answer)); ret answer; } } static Action lastAction() { Concept last = last(history()); if (!last << Action) { historyAdd(last = new NoAction); print("I'm assuming you mean my lack of action?"); } ret last/Action; } svoid good { Action action = lastAction(); if (action == null) ret; if (isTrue(action.good)) print("Thanks, I know! :-)"); else { cset(action, good := true); print("Thanks, saved!"); } } svoid bad { Action action = lastAction(); if (action == null) ret; if (isFalse(action.good)) print("I heard that before..."); else { cset(action, good := false); print("I don't know what I did wrong yet, but I'll save this feedback!"); } }