def depth(self):
        """
        Compute the depth of the tree (depth of a leaf=0).
        
        """
        return self.fold_up(lambda n, fl, fg: max(fl + 1, fg + 1), lambda leaf: 0)
Compute the depth of the tree (depth of a leaf=0).