sclass SelectBot extends Concept { new TreeMap examples; new TreeMap guessed; transient S lastMatch; void put(S s, A value) { examples.put(s, value); guessed.remove(s); change(); } A get(S s) { lastMatch = guess(s); A value = mapGet(examples, lastMatch); if (neq(lastMatch, s)) if (mapPutIfChange(guessed, s, value)) change(); ret value; } S guess(S s) { ret levenClosestIC(examples, s); } }