TreeChildren
TreeChildren[tree]
extracts the children of the root of the Tree object tree.
Details
- TreeChildren returns the children {subtree1,subtree2,…} of Tree[data,{subtree1,subtree2,…}].
- TreeChildren[Tree[data,None]] gives None.
Examples
open allclose allProperties & Relations (4)
TreeChildren[Tree[data,subtrees]] gives subtrees:
TreeChildren[Tree[data,{}]] gives {}:
TreeChildren[Tree[data,None]] gives None:
RootTree[tree] gives Tree[TreeData[tree],None] when TreeChildren[tree] gives None:
RootTree[tree] gives Tree[TreeData[tree],{}] when TreeChildren[tree] gives a list:
TreeChildren[tree] is equivalent to TreeLevel[tree,{1}] when TreeChildren[tree] gives a list:
Text
Wolfram Research (2021), TreeChildren, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeChildren.html (updated 2022).
CMS
Wolfram Language. 2021. "TreeChildren." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/TreeChildren.html.
APA
Wolfram Language. (2021). TreeChildren. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeChildren.html