Proposal: containers: add indexing operations for Set

Johan Tibell johan.tibell at gmail.com
Tue Jul 3 21:30:39 CEST 2012


Hi,

On Tue, Jul 3, 2012 at 3:10 PM, Patrick Palka <patrick at parcs.ath.cx> wrote:
> I'd like to add the following indexing operations for Data.Set.Set, to
> complement the existing functions for Data.Map.Map:
>
> findIndex :: Ord a => a -> Set a -> Int
> lookupIndex :: Ord a => a -> Set a -> Maybe Int
> elemAt :: Int -> Set a -> a
> deleteAt :: Int -> Set a -> Set a
>
> A tentative patch can be found here
> https://github.com/haskell/containers/pull/13

I'm fine with this API addition, as it's consistent with what we
already do for (ordered) maps. I haven't reviewed the actual patch
yet.

Cheers,
Johan



More information about the Libraries mailing list