
Twan van Laarhoven wrote:
Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/multiset-0.1 Haddock: http://twan.home.fmf.nl/multiset/doc/ Darcs: http://twan.home.fmf.nl/repos/multiset/
There used to be Daan's DData http://research.microsoft.com/users/daan/ddata.html How does your implementation relate to his (MultiSet and IntBag)? (partial reuse or duplication, differences) Cheers Christian

Christian Maeder wrote:
There used to be Daan's DData http://research.microsoft.com/users/daan/ddata.html
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. Twan
participants (2)
-
Christian Maeder
-
Twan van Laarhoven