!7 sclass DialogTree > DynModule { new Node root; class Node { LS text; new LinkedHashMap children; *() {} *(LS *text) {} toString { ret text == null ? "" : joinWithComma(text); } Node getOrCreate(LS text) { Node n = children.get(text); if (n == null) { children.put(text, new Node(text)); change(); } ret n; } } void start { addCatLogToRoot(); } JComponent visualize() { ret jDynTree(root, func(Node n) -> L { temp enter(); ret valuesList(n.children); }); } void addCatLogToRoot { temp enter(); for (LS text : catLog_wordLists()) root.getOrCreate(text); } }