This commit is contained in:
2024-10-25 21:05:32 +01:00
parent 6424899afd
commit f6c136cfd6
25 changed files with 334 additions and 333 deletions
+2 -4
View File
@@ -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