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

12
LINES

< > BotCompany Repo | #1003341 // printOccTree - uses toString() for elements

JavaX fragment (include)

1  
static void printOccTree(OccTree t) {
2  
  print("[" + t.count + "]");
3  
  printOccTree_sub(t, "  ");
4  
}
5  
6  
static void printOccTree_sub(OccTree t, S indent) {
7  
  for (O e : keys(t.followUp)) {
8  
    OccTree t2 = t.followUp(e);
9  
    print(indent + "[" + t2.count + "] " + e);
10  
    printOccTree_sub(t2, indent + "  ");
11  
  }
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: #1003341
Snippet name: printOccTree - uses toString() for elements
Eternal ID of this version: #1003341/1
Text MD5: e2ab437176cd585e321d17e261a282ec
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-06-19 19:57:16
Source code size: 321 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 555 / 580
Referenced in: [show references]