<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hi,</DIV>
<DIV>I'm having trouble with this small exercise. </DIV>
<DIV><SPAN class="pBody postableBody"></SPAN>&nbsp;</DIV>
<DIV><SPAN class="pBody postableBody">A function&nbsp;maybeA takes a list of pairs. A pair has a variable 'a' and a value 'b'. If&nbsp;any&nbsp;first element&nbsp;of a&nbsp;pair equals to any first element of another pair, the function returns Nothing. If&nbsp;they&nbsp;aren't equal, the function returns a tuple containing the first variable, its value and the value of the second variable.</SPAN></DIV>
<DIV><SPAN class="pBody postableBody"><SPAN class="pBody postableBody">maybeA :: [(a,b)] -&gt; Maybe (a,b,b)<BR></SPAN><BR><BR>For example: &nbsp;[(a1,b1),(a2,b2),(a3,b3)..<WBR>] returns Nothing if a2 = a3 and&nbsp;returns Just (a2,b2,b3)&nbsp;if&nbsp;&nbsp;a2 /= a3</SPAN></DIV>
<P><SPAN class="pBody postableBody"></SPAN>&nbsp;</P>
<P><SPAN class="pBody postableBody">I'm currently have :</SPAN></P><SPAN class="pBody postableBody"><SPAN lang=EN>
<P>maybeA [(a1,b1),(a2,b2)] </P>
<P>&nbsp;&nbsp;&nbsp; |a1 == a2 = Nothing</P>
<P>&nbsp;&nbsp;&nbsp; |a1 /= a2 = Just (x1,y1,y2)</P>
<P>but it only takes 2 pairs. Any helps?</P>
<P>&nbsp;</P>
<P>Thanks</P></SPAN>
<DIV><BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></DIV></div><br>

      </body></html>