File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1126,9 +1126,9 @@ adjust# f k0 m0 = go h0 k0 0 m0
1126
1126
| otherwise = t
1127
1127
{-# INLINABLE adjust# #-}
1128
1128
1129
- -- | /O(log n)/ The expression (@'update' f k map@) updates the value @x@ at @k@,
1130
- -- (if it is in the map). If (f k x ) is @'Nothing', the element is deleted.
1131
- -- If it is (@'Just' y), the key k is bound to the new value y .
1129
+ -- | /O(log n)/ The expression (@'update' f k map@) updates the value @x@ at @k@
1130
+ -- (if it is in the map). If (@f x@ ) is @'Nothing'@ , the element is deleted.
1131
+ -- If it is (@'Just' y@ ), the key @k@ is bound to the new value @y@ .
1132
1132
update :: (Eq k , Hashable k ) => (a -> Maybe a ) -> k -> HashMap k a -> HashMap k a
1133
1133
update f = alter (>>= f)
1134
1134
{-# INLINABLE update #-}
Original file line number Diff line number Diff line change @@ -244,9 +244,9 @@ adjust f k0 m0 = go h0 k0 0 m0
244
244
| otherwise = t
245
245
{-# INLINABLE adjust #-}
246
246
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 k 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@ .
250
250
update :: (Eq k , Hashable k ) => (a -> Maybe a ) -> k -> HashMap k a -> HashMap k a
251
251
update f = alter (>>= f)
252
252
{-# INLINABLE update #-}
You can’t perform that action at this time.
0 commit comments