[Haskell-cafe] Set of reals...?

Stijn De Saeger stijndesaeger at gmail.com
Wed Oct 27 03:56:26 EDT 2004

Hi all, 

I'm new to this list, as well as to haskell, so this question probably
has "newbie" written all over it.
I'm thinking of a way to represent a set of reals, say the reals
between 0.0 and 1.0.  Right now I am just using a pair of Float to
represent the lower and upper bounds of the set, but i have this dark
throbbing feeling that there should be a more haskellish way to do
this, using laziness.
List comprehensions are out it seems, because they increment with
integer steps... (obviously). In other words,  0.5 `inSet` (Set
[0.0..1.0])   returns False.

I'm sure someone must have hit this problem before me and found a way
around it.
any suggestions greatly appreciated,


More information about the Haskell-Cafe mailing list