static Pair generalDefinitions_remove(S word, S def) { if (empty(word) || empty(def)) ret pair(false, "Empty"); L defs = mechMultiMapCI(generalDefinitions_listName()).get(word); defs = definitions_dropInvalidated(defs); new SS globalIDs; for (S found : defs) if (eqic(dropGlobalID(found), def)) globalIDs.put(getAppendedGlobalID(found), dropGlobalID(found)); if (empty(globalIDs)) ret pair(false, "Definition not there"); for (S id, text : globalIDs) { addToMechMap(generalDefinitions_listName(), litmap(word, appendGlobalID("[invalidate " + id + ": " + text + "]"))); } ret pair(true, "Definition removed " + n2(globalIDs, "time") + ": " + word + " = " + def); }