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

10
LINES

< > BotCompany Repo | #1018100 // listToReversedWordTree - tree starts from the end of each line

JavaX fragment (include)

1  
static Map<S, O> listToReversedWordTree(L<S> l) {
2  
  ret listToReversedWordTree(l, "x"); // any old value that is not a map
3  
}
4  
5  
static Map<S, O> listToReversedWordTree(L<S> l, S value) {
6  
  Map<S, O> tree = ciMap();
7  
  for (S s : unnull(l))
8  
    wordTreeAdd(tree, reversed(javaTokC(s)), value);
9  
  ret simplifyWordTree(tree);
10  
}

Author comment

Began life as a copy of #1014221

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018100
Snippet name: listToReversedWordTree - tree starts from the end of each line
Eternal ID of this version: #1018100/3
Text MD5: 99b5f5b87efa0536cfe164ee63918a90
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-02 13:02:56
Source code size: 330 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 291 / 328
Version history: 2 change(s)
Referenced in: [show references]