Libraryless. Click here for Pure Java version (1511L/10K/32K).
!759 static new Map<S, S> thesaurusMap; p { load("thesaurusMap"); } synchronized answer { if "add thesaurus * *" { S key = m.unq(0), value = m.unq(1); if (match(key, value)) ret "You nasty rascal, don't do the endless loop!"; thesaurusMap.put(key, value); save("thesaurusMap"); ret "OK, saved! Thesaurus size now: " + l(thesaurusMap); } if "thesaurus size" ret lstr(thesaurusMap); if "list thesaurus" ret structure(thesaurusMap); for (S key : keys(thesaurusMap)) if (match(key, s)) { S a = askSelf(thesaurusMap.get(key)); if (nempty(a)) { getInvolvedBots().add(formatSnippetID(programID())); ret a; } } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment