Tks for the answer,<br>the data structure of Either is:<br>   <br><pre><a name="(line50)"></a><a name="Either"></a><span class="keyword">data</span>  <span class="conid">Either</span> <span class="varid">a</span> <span class="varid">b</span>  <span class="keyglyph">=</span>  <span class="conid">Left</span> <span class="varid">a</span> <span class="keyglyph">|</span> <span class="conid">Right</span> <span class="varid">b</span>   <span class="keyword">deriving</span> <span class="layout">(</span><span class="conid">Eq</span><span class="layout">,</span> <span class="conid">Ord</span><span class="layout">,</span> <span class="conid">Read</span><span class="layout">,</span> <span class="conid">Show</span><span class="layout">)<br>
<br>one example of what i want convert is:<br> Left(Right(Left(Left())))<br><br><br></span></pre><div class="gmail_quote">No dia 22 de Outubro de 2010 04:58, Dan Piponi <span dir="ltr">&lt;<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>&gt;</span> escreveu:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">André Batista Martins asked:<br>
<div class="im"><br>
&gt;  i want convert  &quot;Either&quot; to a tree.<br>
&gt;  Example:<br>
&gt;                   Either ( Either  1 2 ) ( Either 3 4)     ---- &gt;<br>
&gt; Branch ( Branch (Leafl 1)  (Leafr2) ) ( Branch (Leafl 3)  (Leafr4)) )<br>
<br>
</div>Before writing the function to convert your data structure, why not<br>
try writing down the precise type signature you expect it to have.<br>
<br>
In fact, before that, try writing down the precise type signature of<br>
the thing you call an &quot;Either&quot;.<br>
--<br>
<font color="#888888">Dan<br>
</font></blockquote></div><br>