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).

1  
static MapSO listToWordTree(LS l) {
2  
  ret listToWordTree(l, "x"); // any old value that is not a map
3  
}
4  
5  
static MapSO listToWordTree(LS l, S value) {
6  
  MapSO tree = wordTree();
7  
  for (S s : unnull(l))
8  
    wordTreeAdd(tree, javaTokC(s), value);
9  
  ret simplifyWordTree(tree);
10  
}

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: 577 / 662
Version history: 7 change(s)
Referenced in: [show references]