1 data Tree a = Leaf a | Branch (Tree a) (Tree a)
3 main = print (height our_tree)
7 Branch (Branch (Leaf 1) (Branch (Branch (Leaf 1) (Leaf 1)) (Leaf 1)))
8 (Branch (Leaf 1) (Leaf 1))
11 height :: Tree a -> Int
14 height (Branch t1 t2) = 1 + max (height t1) (height t2)