It's the typo. Note that you'll also need an Eq a typeclass constraint for this type signature to be correct (which is the next error you'd get)-- underscores for emphasisinter_se_ct1inter_es_ct1_______________________________________________On Thu, Feb 25, 2021 at 3:24 PM Galaxy Being <borgauf@gmail.com> wrote:I have this_______________________________________________intersect1 :: ([a],[a]) -> [a]intersect1 (s,[]) = []
interesct1 (s,t:ts) | elem t s = t : intersect1 (s,ts)
| otherwise = intersect1 (s,ts)and when I try thisintersect1 ([1,2],[1,2,3])I get the errorNon-exhaustive patterns in function intersect1Not sure what's wrong with this.LB
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners