Title: Re: Haskell help!
P.S.  The example given is for the set of sequences/strings (The,Masters)
-----Original Message-----
From: Weix, Rachel Lynn
Sent: Wed 3/26/2003 4:30 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Haskell help!

Currently I'm having problems with type checking due to Haskell being a strongly typed language.  In order to return all optimal solutions, my professor suggested I create a list of tuples if they all have the same score, as indicated in my new maxSeq method (see attachment).  However, this means that the maxSeq method would return type [[(Char,Char)]].  Since maxSeq and getSeq must return the same type, I end up changing all my signatures and end up with lots of problems.  In my caseX methods, I can't append [(Char)] to [[(Char,Char)]], and it also messes up trying to get my score of each tuple, etc.  I've been trying to solve the problem in Scheme first but even then I'm having problems, and Scheme is only loosely typed.  Any suggestions?  The format should be something like the following (partial example):
 
[ [(-,M)] [(T,a)(h,s)(-,t)(e,e)(-,r)(-,s)] [(-,s)(h,t)(e,e)(-,r)(-,s)]]]. 
 
Once I get back my list, I need to pair everything up in order to return a list of optimal solutions.  Taking the previous example, it would be the following when paired up correctly:
 
[ [(-,M)(T,a)(h,s)(-,t)(e,e)(-,r)(-,s)], [(-,M)(T,a)(-,s)(h,t)(e,e)(-,r)(-,s)] ] 
 
From there, I find which sequence has the maximum score.  I then walk through the list again, making a list of all the sequences that have that score.  These two steps seem fairly trivial, it's all the above stuff which I'm struggling on.
 
Rachel
 
-----Original Message-----
From: Marc Ziegert [mailto:[EMAIL PROTECTED]
Sent: Tue 3/25/2003 3:13 PM
To: Weix, Rachel Lynn
Cc:
Subject: Re: Haskell help!

maxSeq had one mistake: || instead of &&

i will think about the problem itself, before rewriting all.

this is the file a little bit more in haskell style.



Am Dienstag, 25. März 2003 20:16 schrieben Sie:
> I found my two mistakes, plus I fixed the method my Professor said was
> incorrect.  Now I just have to be able to find ALL optimal solutions,
> instead of just one.  Hooray!
>
> Rachel

Reply via email to