datatype 'a tree =
Empty
| Node of 'a tree * 'a * 'a tree
datatype 'a shrub = Empty
| Leaf of 'a
| Branch of 'a shrub * 'a shrub
datatype 'a rose =
Rose of 'a * 'a rose list
datatype 'a lazyTree =
LT of unit -> 'a treeFront
and 'a treeFront =
LEAF
| NODE of 'a lazyTree * 'a * 'a lazyTree
datatype 'a tree = Empty
| Node of 'a tree * 'a * 'a tree
3. Copy and paste the text below:
~SML Text will appear here~
Note: only nodes with non-empty parents (aka a valid path to the root)
will appear in the output.
Leave values blank to generate an unbalanced tree/shrub.
Note: does not work if parentheses or commas are enclosed in quotes.
Empty nodes not shown.