represents a tree with a list of child subtrees subtreei.
represents a tree containing data in its root, with children given by subtrees.
- Tree objects represent rooted, ordered, labeled trees. Standard examples include XML trees, file systems and Wolfram Language expressions.
- In Tree[data,subtrees], the subtrees are other Tree expressions or general expressions that are interpreted as leaves.
- Tree[…] displays in a notebook as a plot of a tree graph.
- Tree[…] is always converted to a standard form with structure Tree[data,subtrees].
- Tree[subtrees] is equivalent to Tree[Null,subtrees]
- Tree is treated as a raw object by functions like AtomQ.
Examplesopen allclose all
Basic Examples (4)
Properties & Relations (6)
This is not a valid Tree object:
Wolfram Research (2021), Tree, Wolfram Language function, https://reference.wolfram.com/language/ref/Tree.html.
Wolfram Language. 2021. "Tree." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Tree.html.
Wolfram Language. (2021). Tree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Tree.html