Example: Height of a Tree
l
The height of a tree is the length of the
longest path from the root.
l
height(T) => isLeaf(T) ? 1;
l
height(T) => 1 + sum(map(height, getOffspring(T));
l
Let recursion do the work for you.