On Tue, 12 May 1998, Mariano Suarez Alvarez wrote: | On Tue, 12 May 1998, Koen Claessen wrote: | | > map :: (a -> b) -> [a] -> [b] | > map f (x:xs) = f x : map f xs | > map f xs = xs | | Where is the CSE in theis def of map? Why is it naive? (Hugs & ghc define | map on lists exactly like that.) Maybe I'm naive... Sorry, I was too brief. I meant this: the third line map f xs = xs does not type check. It should be: map f [] = [] Regards, Koen. -- Koen Claessen, [EMAIL PROTECTED], http://www.cs.chalmers.se/~koen, Chalmers University of Technology.
- Re: Pattern Match Success Changes Types Adrian Hey
- Re: Pattern Match Success Changes Types Simon L Peyton Jones
- Re: Pattern Match Success Changes Types S.M.Kahrs
- Re: Pattern Match Success Changes Types Fergus Henderson
- Re: Pattern Match Success Changes Types Jon Mountjoy
- RE: Pattern Match Success Changes Types Frank A. Christoph
- Re: Pattern Match Success Changes Types Adrian Hey
- Re: Pattern Match Success Changes Types Fergus Henderson
- RE: Pattern Match Success Changes Types Koen Claessen
- RE: Pattern Match Success Changes Types Mariano Suarez Alvarez
- Re: Pattern Match Success Changes Types Koen Claessen
- Re: Pattern Match Success Changes Types Fergus Henderson
- RE: Pattern Match Success Changes Types Adrian Hey
- Re: Pattern Match Success Changes Types Mr. Grumpy
- Re: Pattern Match Success Changes Types Fergus Henderson
- Re: Pattern Match Success Changes Types John Whitley
- Re: Pattern Match Success Changes Types Adrian Hey
- Re: Pattern Match Success Changes Types Fergus Henderson
- Re: Pattern Match Success Changes Types Adrian Hey