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

8
LINES

< > BotCompany Repo | #1010249 // webTree_sortChildrenByRelationText - modifies original tree

JavaX fragment (include)

1  
static WebTree webTree_sortChildrenByRelationText(WebTree tree) {
2  
  sortList(tree.children, makeComparator(func(Pair<WebNode, WebTree> a, Pair<WebNode, WebTree> b) {
3  
    stdCompare(web_text(a.a), web_text(b.a))
4  
  }));
5  
  for (Pair<WebNode, WebTree> p : tree.children)
6  
    webTree_sortChildrenByRelationText(p.b);
7  
  ret tree;
8  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1010249
Snippet name: webTree_sortChildrenByRelationText - modifies original tree
Eternal ID of this version: #1010249/1
Text MD5: 62057fea6d3e3b5441c349ac85fb4c4b
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-07 18:39:06
Source code size: 332 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 437 / 425
Referenced in: [show references]