git.iko.soy/monoidal-containers
on master help sign in
Fix docs for lookupM
faa42d5Konstantine Rybnikov
src/Data/HashMap/Monoidal.hs+1−1
@@ -136,7 +136,7 @@ lookup k = M.lookup k . unpack
136{-# INLINE lookup #-}
136{-# INLINE lookup #-}
137
137
138-- | /O(log n)/ Return the value to which the specified key is mapped,
138-- | /O(log n)/ Return the value to which the specified key is mapped,
139−-- or 'Nothing' if this map contains no mapping for the key.
139+-- or mempty if this map contains no mapping for the key.
140lookupM :: (Eq k, Hashable k, Monoid v) => k -> MonoidalHashMap k v -> v
140lookupM :: (Eq k, Hashable k, Monoid v) => k -> MonoidalHashMap k v -> v
141lookupM k = fromMaybe mempty . M.lookup k . unpack
141lookupM k = fromMaybe mempty . M.lookup k . unpack
142{-# INLINE lookupM #-}
142{-# INLINE lookupM #-}