!7

static SS map = unstructMap([[lhm{null="assumed", "what is a bear?"="rejected", "a bear is an animal"="assumed", "a bear is dangerous"="assumed", "\"dude\" is a word for someone"="assumed", "Pouet is a website"="assumed", "an integer is a whole number"="assumed", "what is a small bird"="rejected", "what is a good joke"="assumed", "peter is a fun guy"="confirmed", "john is a person"="confirmed"}]]);

static L<S> tests = ll("what is a bunny", "klaus is a fool", "john is a joker");

p {
  dropValuesFromMapOtherThan(map, 'confirmed, 'rejected);
  int wordIndex = 0;
  O decider = boolGuesserByWordAtIndex(mapValuesToBool(map, 'confirmed), wordIndex);
  
  for (S test : tests)
    print(" " + test + " => " + callF(decider, test));
}