Guided Practice 6.7: Fancier Tree Fold
Recall the data type from Guided Practice 5.1, consisting of trees with numbers in the leaves and with two kinds of interior nodes: one kind with two sons and one kind with three sons.
- Write a fold function for these trees.
- Using your fold function, write leaf-max for these trees.
- Using your fold function, write a function double-all that takes one of these trees and returns a tree of the same shape in which all the leaves are doubled. (This is the same as in Guided Practice 5.1).
Last modified: Mon Sep 18 16:48:29 Eastern Daylight Time 2017