I think someone else mentioned using functions earlier,
rather than a datatype why not define:

   data Interval = Interval { isin :: Float -> Bool }

Then each range becomes a function definition, for example:

   myInterval = Interval {
      isin r
         | r == 0.6 = True
         | r > 0.7 && r < 1.0 = True
         | otherwise = False
      }

Then you can test with:

   (isin myInterval 0.6)

Keean




_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to