ANNOUNCE: multiset 0.1
Twan van Laarhoven
twanvl at gmail.com
Thu Feb 7 13:39:31 EST 2008
Christian Maeder wrote:
> There used to be Daan's DData
> How does your implementation relate to his (MultiSet and IntBag)?
> (partial reuse or duplication, differences)
I got many ideas of the interface from there. The implementation is really just
a very thin wrapper around Data.(Int)Map. To implement the modules I copied
Data.Set, and rewrote each function and adjusted the documentation here and
there (changing set to multiset, etc.). The implementation is mostly straight
forward. A random example:
findMin = fst . Map.findMin . unMS
The difference with Daan's MultiSet is that mine is more 'modern', it has the
same interface of Data.Set. This means some minor differences (e.g. 'singleton'
instead of 'single') and some additional functions such as maxView. DData's
multiset also lacks Ord, Data and Typeable instances.
More information about the Libraries