Maybe because of this:<br><br><span style="font-family: courier new,monospace;">function 0 = 0 where</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> fun 1 = 1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 2 = 2<br><br></span>The last declaration (2=2) can define either fun or function. I'm not saying this is a major problem, but there may be other problems like these.<br>
<br>/J<br><br>On 23 August 2010 11:15, Brent Yorgey <<a href="mailto:byorgey@seas.upenn.edu">byorgey@seas.upenn.edu</a>> wrote:<br>> On Mon, Aug 23, 2010 at 09:33:13AM +0300, John Smith wrote:<br>>> Why doesn't Haskell allow something like this?<br>
>><br>>> fac 0 = 0<br>>> 1 = 1<br>>> x = x * fac (x-1)<br>>><br>>> This would be clearer than repeating the function name each time,<br>>> and follow the same pattern as guards and case.<br>
><br>> Good question. I don't know of any particular reason.<br>><br>> -Brent<br>> _______________________________________________<br>> Beginners mailing list<br>> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/beginners">http://www.haskell.org/mailman/listinfo/beginners</a><br>><br><br>