
4 Jul
2012
4 Jul
'12
4:39 a.m.
Patrick Palka
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
These seem to be abstraction-breaking. And what do we expect from let i = findIndex a s1 in deleteAt i (s1 `union` s2) and similar? -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk