Cleanup
This commit is contained in:
+2
-4
@@ -15,10 +15,8 @@ module IntMapHelp
|
||||
unsafeSwapKeys,
|
||||
safeSwapKeys,
|
||||
findIndex,
|
||||
|
||||
cycleGT,
|
||||
cycleLT,
|
||||
|
||||
invertIntMap,
|
||||
) where
|
||||
|
||||
@@ -99,7 +97,7 @@ cycleLT :: Int -> IntMap a -> Maybe (Int, a)
|
||||
cycleLT i m = lookupLT i m <|> lookupMax m
|
||||
|
||||
invertIntMap :: Ord a => IntMap a -> M.Map a [Int]
|
||||
invertIntMap = foldrWithKey
|
||||
invertIntMap =
|
||||
foldrWithKey
|
||||
(\k xs -> M.insertWith (++) xs [k])
|
||||
mempty
|
||||
|
||||
|
||||
Reference in New Issue
Block a user