Data.Map.splitLookup

Ross Paterson ross at soi.city.ac.uk
Tue Jan 18 06:35:50 EST 2005


Currently there is

	splitLookup :: Ord k => k -> Map k a -> (Maybe a,Map k a,Map k a)

returning the matching element (if any) and the submaps less and greater
than the key.  I think it would be neater to return the element in
the middle:

	splitLookup :: Ord k => k -> Map k a -> (Map k a,Maybe a,Map k a)

Perhaps Data.Set.splitMember should similarly be changed from

	splitMember :: Ord a => a -> Set a -> (Bool,Set a,Set a)
to
	splitMember :: Ord a => a -> Set a -> (Set a,Bool,Set a)


More information about the Libraries mailing list