WLJS LogoWLJS Notebook

TreeLeaves

TreeLeaves[tree] returns the list of leaves of the tree.

Examples

Get the leaves of a tree:

TreeLeaves[Tree[a, {Tree[b, {c, d}], e}]]
(* {c, d, e} *)

Please visit the official Wolfram Language Reference for more details.

On this page