News for hackers. Stuff that matters.
Re:Destroy All Ifs – A Perspective from Functional Programming by lomnakkus on Sunday July 17, 2016 @02:17AM (#12109211)
Assuming you're right about the guesses for those parameters, we could go a little further. Let's define

   data Directionality = Clockwise | Anticlockwise

   data AngularInterval = {
     beginAngle :: Double,
     endAngle :: Double,
     directionality :: Directionality
   }
... and then we're down to three parameters, all of different types (so no opportunity for mistakes, assuming static checking) and who knows, you might even have other uses for AngularInterval.

There are no comments on this comment yet.