<div dir="auto">Don’t worry about it. We’ve all been there. </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 25, 2021 at 18:01 Galaxy Being <<a href="mailto:borgauf@gmail.com">borgauf@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">How embarrassing...<div><br></div><div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)">intersect1 :: (Eq a) => ([a],[a]) -> [a]</font><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 25, 2021 at 5:53 PM Bob Ippolito <<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">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)<div><br></div><div>-- underscores for emphasis</div><div><span style="font-family:monospace">inter_se_ct1</span><br></div><div><span style="font-family:monospace">inter_es_ct1</span></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 25, 2021 at 3:24 PM Galaxy Being <<a href="mailto:borgauf@gmail.com" target="_blank">borgauf@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">I have this<div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)"><br></font></div><div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)">intersect1 :: ([a],[a]) -> [a]</font><br></div><div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)">intersect1 (s,[])              = []<br>interesct1 (s,t:ts) | elem t s = t : intersect1 (s,ts)<br>                    | otherwise = intersect1 (s,ts)</font><br></div><div><br></div><div>and when I try this</div><div><br></div><div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)">intersect1 ([1,2],[1,2,3])</font><br></div><div><br></div><div>I get the error </div><div><br></div><div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)"> Non-exhaustive patterns in function intersect1<br></font></div><div><font face="monospace" style="font-family:monospace;color:rgb(0,0,0)"><br></font></div><div>Not sure what's wrong with this.</div><div><br></div><div>LB</div><div><br></div><div><br></div></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div></div>