[Haskell-cafe] [] \\ [1..] diverges - intended?

Henk-Jan van Tuyl hjgtuyl at chello.nl
Mon Jul 28 16:31:50 UTC 2014


On Mon, 28 Jul 2014 16:10:38 +0200, Daniil Frumin <difrumin at gmail.com>  
wrote:

> Hi!
>
> On Sun, Jul 27, 2014 at 12:55 AM, Henk-Jan van Tuyl <hjgtuyl at chello.nl>  
> wrote:
>>   (\\)  :: (Eq a) => [a] -> [a] -> [a]
>>   (\\) [] _ = []
>>   (\\) _ [] = []
>>   (\\) xs (y : ys) = delete y xs \\ ys
>>
>
> Is this actually correct? Shouldn't the second line be
>
> (\\) x [] = x
>
> ?

You are right; as it was just to prove a point I didn't spend enough time  
reviewing/testing it. My life would have been much easier if I had chosen  
an area of expertise where showing my diploma was enough to prove that I  
am right.

Regards,
Henk-Jan van Tuyl


-- 
Folding at home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.
http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--


More information about the Haskell-Cafe mailing list