André Batista Martins asked: > i want convert "Either" to a tree. > Example: > Either ( Either 1 2 ) ( Either 3 4) ---- > > Branch ( Branch (Leafl 1) (Leafr2) ) ( Branch (Leafl 3) (Leafr4)) )
Before writing the function to convert your data structure, why not try writing down the precise type signature you expect it to have. In fact, before that, try writing down the precise type signature of the thing you call an "Either". -- Dan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe