diff --git a/source/niknaks/containers.d b/source/niknaks/containers.d index 0fc8883..1eaff9f 100644 --- a/source/niknaks/containers.d +++ b/source/niknaks/containers.d @@ -830,15 +830,25 @@ public class Tree(T) } } - // if(found) - // { - // this.children = this.children.removeResize(idx, true, true); - // return true; - // } + if(found) + { + this.children = this.children.removeResize(idx); + return true; + } return false; } + public T opIndex(size_t idx) + { + return idx < this.children.length ? this.children[idx].getValue() : T.init; + } + + public T getValue() + { + return this.value; + } + public T[] dfs ( InclusionStratergy!(T) strat = toDelegate(&Always!(T)),