implementation module tree :: Tree a = Leaf | Node a (Tree a) (Tree a)