<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>hi<BR>
&nbsp;<BR>
I was testing my code when I came across a strange predicament. The input is a list of ints and a Results type which is of type [(int,.......),(Int......)......]. I am comparing each int from the list to the first element in each member of results. But it works for 1-9 but not for 10 onwards.... why? <BR>
Have I missed a clause anywhere...... it only does the first one after that. <BR>
&nbsp;<BR><FONT size=2>
<P align=left></FONT><FONT color=#8080c0 size=2>--Print the points of eight games</P></FONT><FONT size=2>
<P align=left>poolsPoints :: [Int] </FONT><B><FONT face="" color=#0000c4 size=2>-&gt;</B></FONT><FONT face="" size=2> Results </FONT><B><FONT face="" color=#0000c4 size=2>-&gt;</B></FONT><FONT face="" size=2> Int</P>
<P align=left>poolsPoints [] [] = 0</P>
<P align=left>poolsPoints [] _ = 0</P>
<P align=left>poolsPoints _ [] = 0</P>
<P align=left>poolsPoints (x:xs) ((a,b,c,d,e):t) </P>
<P align=left>| (x == a &amp;&amp; c&gt;d) = 1 + poolsPoints xs t</P>
<P align=left>| (x == a &amp;&amp; c&lt;d) = 1 + poolsPoints xs t</P>
<P align=left>| (x == a &amp;&amp; c==0 &amp;&amp; d==0) = 2 + poolsPoints xs t</P>
<P align=left>| (x == a &amp;&amp; c==d &amp;&amp; c&gt;0) = 3 + poolsPoints xs t</P>
| </FONT><B><FONT color=#40c0c0 size=2>otherwise</B></FONT><FONT face="" size=2> = 0 + poolsPoints [x] t</FONT><BR>
<FONT face="" size=2></FONT>&nbsp;<BR>
<FONT face="" size=2>Thanks</FONT><BR>
<FONT face="" size=2></FONT>&nbsp;<BR>
<FONT face="" size=2>Ryan<BR></FONT><br /><hr />Play Movie Mash-up and win  <a href='https://www.moviemashup.co.uk' target='_new'>BIG prizes! </a></body>
</html>