[Haskell-cafe] Re: Trees

apfelmus apfelmus at quantentunnel.de
Mon Dec 3 03:40:17 EST 2007

Adrian Neumann wrote:
>  > data Tree a = Leaf a | Node a [Tree a]
> But now the assignments require more than a simple top-down traversal. 
> For example: given a tree t and two nodes u,v, find the first common 
> ancestor.

Well, this problem doesn't make much sense in Haskell. How do you 
specify the subtrees u and v in the first place?


More information about the Haskell-Cafe mailing list