public void traverse(NTree <T> node, TreeVisitor <T> visitor) { visitor(node.data); foreach (NTree <T> kid in node.children) { traverse(kid, visitor); } }
public void addChild(NTree <T> node) { children.AddFirst(node); }