State of DData

Carl Witty cwitty at
Fri Mar 26 12:46:11 EST 2004

On Fri, 2004-03-26 at 11:15, John Meacham wrote:
> A specified bias is very important for reasoning about time/space
> efficiency. I think it is quite important.
> plus, even though (==) means equality, every now and again it comes in
> handy to cheat a little :)

Given a Map type with a specified value bias, you can construct a Set
type with this bias with something like:

type Set t = Map t t
set_insert t set = map_insert t t set
set_iterate f set = map_iterate (\key value -> f value) set

Of course, it would be simpler to just document the bias on an existing
Set implementation. :)

Carl Witty

More information about the Libraries mailing list