<br>Might have not been clear, but i will try illustrate .<br><br><br>f:: a-&gt; b -&gt; c -&gt; (b,(c,a))<br><br>f1 ::  c -&gt; a -&gt; d<br><br><br>input type:<br>                               A   B   C <br>                                 ----------<br>
                               |    f      |<br>                               | _____ |<br><br>output                       (B,(C,A))<br>                                                                                         <br>
<br>                                 C    A <br>                                 ----------<br>                               |    f1    |<br>                               | _____ |<br><br>output                         D<br>
<br>If i want compose   f  and f1, i need to do a correct input to f1 from the output of f.<br>So i want one function to  convert the output of &quot;f&quot; to input off &quot;f!&quot;.<br>In this case,  we do      f1 fst (snd (t,(t1,t2)))  snd (snd (t,(t1,t2)))<br>
But i want do this automaticaly, for type of any two function. I search for the &quot;glue&quot;.<br><br>I don&#39;t have any concern about what the function does, i only have interess on input and output types.<br><br><br>
Cheers,<br> André<br><br><br><br><div class="gmail_quote">No dia 9 de Outubro de 2010 22:38, André Batista Martins <span dir="ltr">&lt;<a href="mailto:andre_bm@netcabo.pt">andre_bm@netcabo.pt</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;">
Hello,<br> exists any algorithm  to determine how terms can be changed to safisty the type of one function?<br><br><br>example:<br><br>f:: a-&gt; b -&gt; c -&gt; (b,c,a)<br><br>f1 ::  c -&gt; a -&gt; d<br><br>In my first function &quot;f&quot; i want assign  the output &quot;c&quot; and &quot;a&quot; for to input of function &quot;f1&quot;.<br>


I searched for any solution, but i didn&#39;t find any anything.<br><br>One 
clue i have found is &quot;minimal edit distance algorithm&quot; for 2 strings. 
Perhaps if i convert de output type of &quot;f&quot; to one string, and de input 
of &quot;f1&quot; to another string and then use this algorithm , i will get one 
&quot;dirty&quot; solution...<br>
<br>I&#39;m open to any sugestion.<br>
</blockquote></div><br>