1
1
mirror of https://github.com/nmattia/niv.git synced 2024-11-25 20:45:21 +03:00

Implement an undefined

This commit is contained in:
Nicolas Mattia 2019-06-12 17:35:51 +02:00
parent b5fa195dca
commit 43d7884eb4

View File

@ -361,8 +361,12 @@ cmdUpdate = \case
setSources $ Sources sources'
partitionEithersHMS
:: HMS.HashMap k (Either a b) -> (HMS.HashMap k a, HMS.HashMap k b)
partitionEithersHMS = undefined
:: (Eq k, Hashable k)
=> HMS.HashMap k (Either a b) -> (HMS.HashMap k a, HMS.HashMap k b)
partitionEithersHMS =
flip HMS.foldlWithKey' (HMS.empty, HMS.empty) $ \(ls, rs) k -> \case
Left l -> (HMS.insert k l ls, rs)
Right r -> (ls, HMS.insert k r rs)
-------------------------------------------------------------------------------
-- DROP