Ben Millwood wrote:
> On Sun, Oct 17, 2010 at 11:15 AM, Malcolm Wallace
> <[email protected]> wrote:
>>
>> The problem with the code you originally posted was that it looked like
>> this:
>>
>> f r = do r' <- something
>> f r'
>> something else -- this is dead code
>>
>> That is, the computation is non-terminating, because f simply calls
>> itself recursively, with no base case.
>>
>> Regards,
>> Malcolm
>
> He was using ==, not =, it was a statement of equality not a definition :)
>
> Much like one might say that sort xs == sort (reverse xs).
Yes, I thought that was obvious from the context. A different layout i.e.
f r
=
do r' <- something
f r'
would have made that clearer.
Cheers
Ben
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe