
Thanks, I got it and it run sucessfully now.
On 6/18/06, Jason Dagit
On 6/17/06, Sara Kenedy
wrote: [snip] When I try function lisOfString as below, it runs forever (non-stop) although I have the stop criteria for it ??
The patterns are tested on a 'first come first served' basis. As your program executes, it tries the first pattern listed, if it matches then the right-hand side of the equation is evaluated. You do have a stop criteria for both functions but it is not evaluating because the pattern that comes before it matches. When using patterns you must remember to put the most specific patterns first or else they may never be reached.
I hope that helps, Jason _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe