Hi,
I was wondering if anyone knows of a package implementing a fast lookup
for an element in ranges.

For example, this operation:
Ord a => a -> [(a, a)] -> Bool

...can be implemented:
\a rs -> let s = Set.fromList rs in a `member` s

This is not particularly efficient. A segment tree seems like a more
appropriate data structure to store the ranges. Does such a library exist?

-- 
Tony Morris
http://tmorris.net/



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to