WLJS LogoWLJS Notebook

Tree

Tree[{subtree1, subtree2, ...}] represents a tree with a list of child subtrees subtreei.

  • Tree[<|key1 -> subtree1, key2 -> subtree2, ...|>] specifies children as an association with keys.
  • Tree[data, subtrees] represents a tree containing data in its root, with children given by subtrees.

Examples

Tree[a, {Tree[b, {}], Tree[c, {}]}]
Tree["root", {Tree["child1", {}], Tree["child2", {}]}]
ExpressionTree[a + b * c]

*See the official Wolfram Language Reference for more details.

On this page