No title

1
2
3
4
5
data Tree = Leaf Int | Branch Tree Int Tree

maxTree :: Tree -> Int
maxTree (Leaf i) = i
maxTree (Branch t1 i t2) = maximum [maxTree t1, i, maxTree t2]