1 | static Pair<Bool, S> generalDefinitions_add(S word, S def) { |
2 | if (empty(word) || empty(def)) ret pair(false, "Empty"); |
3 | |
4 | if (mapPairB(f dropGlobalID, mechMultiMapPairsCI(generalDefinitions_listName()).get(word)).contains(pair(word, def))) |
5 | ret pair(false, "Definition already there!"); |
6 | |
7 | addToMechMap(generalDefinitions_listName(), litmap(word, appendGlobalID(def))); |
8 | ret pair(true, print("Definition added: " + word + " = " + def)); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017007 |
Snippet name: | generalDefinitions_add |
Eternal ID of this version: | #1017007/3 |
Text MD5: | 26957d6a98cfdc4a86951ed093a0671b |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-11 17:20:15 |
Source code size: | 457 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 441 / 461 |
Version history: | 2 change(s) |
Referenced in: | [show references] |