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

12
LINES

< > BotCompany Repo | #1010241 // web_printTree - walk through web and print a tree

JavaX fragment (include)

1  
static void web_printTree(WebNode node) {
2  
  web_printTree(node, "", "", new HashSet);
3  
  print();
4  
}
5  
6  
static void web_printTree(WebNode node, S indent, S relation, HashSet<WebNode> seen) {
7  
  if (node == null) ret;
8  
  print(indent + relation + node.text());
9  
  if (!seen.add(node)) ret;
10  
  for (WebNode n : web_forwardRelated(node))
11  
    web_printTree(n, indent + "  ", appendIfNempty(web_relationText(node, n), " -> "), seen);
12  
}

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: #1010241
Snippet name: web_printTree - walk through web and print a tree
Eternal ID of this version: #1010241/5
Text MD5: 44fc403b46284e696b5b57bc44e75f26
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:19:43
Source code size: 433 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 413 / 457
Version history: 4 change(s)
Referenced in: [show references]