Open
Description
Currently, methods such as insert
are private, since (1) they cannot guarantee the internal invariants of a tree completely, and (2) their signature is inconsistent between Tree
and PureTree
.
However, it may well be sensible to access the tree mutably after its construction. Therefore, it is necessary to provide a public interface that fulfills the missing properties mentioned above.
Furthermore, there may be more methods than insert
to consider, e.g.
remove(filter)
removes objects based on some filter.collapse(filter)
collapses nodes to empty nodes based on some filter.extend(iterator)
inserts all elements from the iterator into the tree. (stdlib trait Extend)- …