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)

static void printOccTree(OccTree t) {
  print("[" + t.count + "]");
  printOccTree_sub(t, "  ");
}

static void printOccTree_sub(OccTree t, S indent) {
  for (O e : keys(t.followUp)) {
    OccTree t2 = t.followUp(e);
    print(indent + "[" + t2.count + "] " + e);
    printOccTree_sub(t2, indent + "  ");
  }
}

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: 550 / 576
Referenced in: #1003411 - printOccTree2 - uses toString() for elements
#1006654 - Standard functions list 2 (LIVE, continuation of #761)