Proposal: containers: add indexing operations for Set
Henning Thielemann
lemming at henning-thielemann.de
Wed Jul 4 11:26:05 CEST 2012
On Wed, 4 Jul 2012, Thomas Schilling wrote:
> I'm surprised that these functions already exists in Data.Map. What
> are the use cases?
These index functions should certainly be part of an OrderedMap AP. But
since Map functions have "Ord" constraints and not "MapDomain", the
abstraction is already broken by the way how Data.Map is designed today.
Anyway, I found the index functions useful when working with wxHaskell and
Notebook pages. WX manages these pages by numbers, but I want to add and
remove pages dynamically while keeping the pages sorted with respect to
their titles.
More information about the Libraries
mailing list