Fernando Rodriguez <[EMAIL PROTECTED]> writes: > f :: [a] ->[a] ->[a] > f (w : ws) = ws : w
> Couldn't match expected type `[a] -> [a]' > against inferred type `[[a]]' > In the expression: ws : w > In the definition of `f': f (w : ws) = ws : w > What's Haskell trying to tell me? I'm a newby so please forgive my ignorance. First that your type signature doesn't match the definition - you claim in the signature that f will take two parameters, but you give it only one (a list) in the definition. That wouldn't be illegal if the right hand side was a function, but it isn't. When you fix that, Haskell will go on to tell you something about the type of (:). :-) -k -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe