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

10
LINES

< > BotCompany Repo | #1014221 // listToWordTree

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2726L/17K).

static MapSO listToWordTree(LS l) {
  ret listToWordTree(l, "x"); // any old value that is not a map
}

static MapSO listToWordTree(LS l, S value) {
  MapSO tree = wordTree();
  for (S s : unnull(l))
    wordTreeAdd(tree, javaTokC(s), value);
  ret simplifyWordTree(tree);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1014221
Snippet name: listToWordTree
Eternal ID of this version: #1014221/8
Text MD5: 683c65f36c7a22a9de9f612618241af8
Transpilation MD5: 2a500b2de2f16b0890dde95b28f3d387
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-06 20:37:53
Source code size: 283 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 578 / 664
Version history: 7 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014222 - wordTreeAdd
#1014760 - wordTree - make empty word tree
#1017477 - tokCListToGroupingWordTree
#1017524 - mapToWordTree
#1018100 - listToReversedWordTree - tree starts from the end of each line