Std.Tree.Tree
1 declaration
type
TreeThis declaration introduces a public type.
What it does
A value with a sequence of trees beneath it.
A syntax tree, an outline, a menu, a reporting line, a dependency view: each
is one thing that holds a number of things of the same kind. Written out
each time, that is a record and a handful of walks, rewritten per program
and subtly different in each — one counts the root, another does not; one
keeps the order children were given, another sorts them.
The shape here settles those questions once. Every node carries a value and
a sequence of children, and a node with no children is not a separate case:
it is a node whose sequence is empty. That is what removes the Option a
hand-written hierarchy usually has at every branch.
Children keep the order they were given. A hierarchy where order did not
matter would be a node holding a Set, and that is a different structure
with a different type.
Read the signature
- This declaration has no value signature because it introduces a type or trait.
