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>