Tks for the answer,
the data structure of Either is:
data Either a b = Left a | Right b deriving (Eq, Ord, Read, Show)
one example of what i want convert is:
Left(Right(Left(Left())))
André Batista Martins asked:
Before writing the function to convert your data structure, why not
> i want convert "Either" to a tree.
> Example:
> Either ( Either 1 2 ) ( Either 3 4) ---- >
> Branch ( Branch (Leafl 1) (Leafr2) ) ( Branch (Leafl 3) (Leafr4)) )
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