Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1016354 // mechMultiMapCI - mech list as case-insensitive multimap

JavaX fragment (include)

// name -> (name, parsed map)
static Map<S, Pair<S, MultiMap<S>>> mechMultiMapCI_cache = synchroMap();

static MultiMap<S> mechMultiMapCI(S listName) {
  Pair<S, MultiMap<S>> p = mechMultiMapCI_cache.get(listName);
  S text = mechList_opt_raw(listName);
  if (p != null && eq(p.a, text)) ret p.b;
  MultiMap<S> map = parseDoubleArrowMultiMapCI(tlft(text));
  p = pair(text, map);
  mechMultiMapCI_cache.put(listName, p);
  ret p.b;
}

Author comment

Began life as a copy of #1014197

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: #1016354
Snippet name: mechMultiMapCI - mech list as case-insensitive multimap
Eternal ID of this version: #1016354/4
Text MD5: 6ff82cc0547bec749d280b5708525fc5
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-16 15:01:32
Source code size: 444 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 437 / 492
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1016376 - mechReversedMultiMapCI - mech list as reversed case-insensitive multimap
#1016464 - mechMultiMapPairsCI - mech list as case-insensitive "pairs" multimap (to allow CI lookup but preserve original spelling)