<DIV>Hi</DIV>
<DIV> </DIV>
<DIV>I'm not especially experienced in using haskell, and I could use some help.</DIV>
<DIV> </DIV>
<DIV>As part of a project, I'm trying to construct a data type that can represent three values as a 'triple' (as opposed to a 'tuple'), and then make a function so that I can sort these values into ascending order.</DIV>
<DIV> </DIV>
<DIV>I'm having a few problems with the code that I have at the minute (I suspect its riddled with errors!)</DIV>
<DIV> </DIV>
<DIV>type Triple = Triple {</DIV>
<DIV> entry 1 :: a;</DIV>
<DIV> entry 2 :: a;</DIV>
<DIV> entry 3 :: a;</DIV>
<DIV> sortTriple :: Triple a -> Triple a;</DIV>
<DIV> } deriving (Show, Eq)</DIV>
<DIV>where</DIV>
<DIV> sortTriple <A href="mailto:t@(Triple">t@(Triple</A> x y z)</DIV>
<DIV> | (y<x) = sortTriple (Triple y x z)</DIV>
<DIV> | (z<y) = sortTriple (Triple x z y)</DIV>
<DIV> | otherwise = t</DIV>
<DIV> </DIV>
<DIV>Hope you guys can help me, sorry if this seems trivial - but I'm only a beginner! If you could explain/correct any errors I'd appreciate it, as I am trying to learn what to do and what not to do, not just arrive at a working program.</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV>S. Midley</DIV><p>
                <hr size=1> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://uk.rd.yahoo.com/evt=21626/*http://www.allnewmessenger.com"><strong><font face="Arial, Helvetica, sans-serif">ALL-NEW
Yahoo! Messenger</font></strong></a><font face="Arial, Helvetica, sans-serif"><strong>
- all new features - even more fun!</strong></font><strong><font color="#FF9900">
</font></strong></font>