Hi Haskell Cafe,<br><br>I tried using type families over functions, but when I try it complains that the two lines marked conflict with each other.<br><br>class Broadcast a where<br>&nbsp;&nbsp; type Return a<br>&nbsp;&nbsp; broadcast :: a -&gt; Return a<br>
<br>instance Broadcast [a -&gt; r] where<br>&nbsp;&nbsp; type Return [a -&gt; r] = a -&gt; [r] -- Conflict!<br>&nbsp;&nbsp; broadcast fs a = []<br><br>instance Broadcast [a -&gt; b -&gt; r] where<br>&nbsp;&nbsp; type Return [a -&gt; b -&gt; r] = a -&gt; b -&gt; [r] -- Conflict!<br>
&nbsp;&nbsp; broadcast fs a b = []<br><br>Given that in Haskell, every function of n+1 arguments is also a function of n arguments, this is likely the cause of the conflict.<br><br>In this case, currying is not my friend.<br><br>Unfortunately this means I&#39;m stuck with numbered function names:<br>
<br>bc0 :: [r] -&gt; [r]<br>bc0 rs = rs<br><br>bc1 :: [a -&gt; r] -&gt; a -&gt; [r]<br>bc1 [] a = []<br>bc1 (r:rs) a = (r a):bc1 rs a<br><br>bc2 rs a b = rs `bc1` a `bc1` b<br><br>bc3 rs a b c = rs `bc1` a `bc1` b `bc1` c<br>
<br>-- etc<br><br>Cheers,<br><br>-John<br><br>