[Haskell-cafe] Finding the Convex Hull (Problem 12 of Real World Haskell)

2009-03-05 Thread Rob Crowther
I wrote a solution to this problem, but it appears to return incorrect results. There's a pastebin of the code at http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2121 and a picture of the inputs, outputs, and expected results graphed at http://img510.imageshack.us/img510/9971/resultsg.jpg I'm

Re: [Haskell-cafe] Finding the Convex Hull (Problem 12 of Real World Haskell)

2009-03-05 Thread Andrew Wagner
Whenever I'm looking for a bug in Haskell code, I find it helpful to start by seeing if I can simplify the code any first. In this case, there are a couple of things I notice: - validPointsOf is just a filter. It would be easier to write valid :: MyDirection - Bool and then validPointsOf =

Re: [Haskell-cafe] Finding the Convex Hull (Problem 12 of Real World Haskell)

2009-03-05 Thread Daniel Fischer
Am Donnerstag, 5. März 2009 13:40 schrieb Rob Crowther: I wrote a solution to this problem, but it appears to return incorrect results. There's a pastebin of the code at http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2121 and a picture of the inputs, outputs, and expected results graphed at