previous | index | next

Tree Construction Example

Q: What is the list representation of the tree whose root is 3 and subtrees are empty?

A: (3 () ())

Q: How to create this tree using the operations we have defined?

A:   (make-nonempty-tree 3 
                         (make-empty-tree)
                         (make-empty-tree)) ⇒ (3 () ())

previous | index | next