Skip to content

Commit d863736

Browse files
emilypisjakobi
andauthored
Update Data/HashMap/Strict/Base.hs
Co-authored-by: Simon Jakobi <[email protected]>
1 parent f2f2a9a commit d863736

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Data/HashMap/Strict/Base.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ adjust f k0 m0 = go h0 k0 0 m0
244244
| otherwise = t
245245
{-# INLINABLE adjust #-}
246246

247-
-- | /O(log n)/ The expression (@'update' f k map@) updates the value @x@ at @k@
248-
-- (if it is in the map). If (@f x@) is @'Nothing'@, the element is deleted.
249-
-- If it is (@'Just' y@), the key @k@ is bound to the new value @y@.
247+
-- | /O(log n)/ The expression @('update' f k map)@ updates the value @x@ at @k@
248+
-- (if it is in the map). If @(f x)@ is 'Nothing', the element is deleted.
249+
-- If it is @('Just' y)@, the key @k@ is bound to the new value @y@.
250250
update :: (Eq k, Hashable k) => (a -> Maybe a) -> k -> HashMap k a -> HashMap k a
251251
update f = alter (>>= f)
252252
{-# INLINABLE update #-}

0 commit comments

Comments
 (0)