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 @@ -1169,9 +1169,9 @@ adjust# f k0 m0 = go h0 k0 0 m0
1169
1169
| otherwise = t
1170
1170
{-# INLINABLE adjust# #-}
1171
1171
1172
- -- | /O(log n)/ The expression (@ 'update' f k map@) updates the value @x@ at @k@,
1173
- -- (if it is in the map). If (f k x) is @ 'Nothing', the element is deleted.
1174
- -- If it is (@ 'Just' y), the key k is bound to the new value y .
1172
+ -- | /O(log n)/ The expression @( 'update' f k map)@ updates the value @x@ at @k@
1173
+ -- (if it is in the map). If @ (f x)@ is 'Nothing', the element is deleted.
1174
+ -- If it is @( 'Just' y)@ , the key @k@ is bound to the new value @y@ .
1175
1175
update :: (Eq k , Hashable k ) => (a -> Maybe a ) -> k -> HashMap k a -> HashMap k a
1176
1176
update f = alter (>>= f)
1177
1177
{-# INLINABLE update #-}
Original file line number Diff line number Diff line change @@ -251,9 +251,9 @@ adjust f k0 m0 = go h0 k0 0 m0
251
251
| otherwise = t
252
252
{-# INLINABLE adjust #-}
253
253
254
- -- | /O(log n)/ The expression (@ 'update' f k map@) updates the value @x@ at @k@,
255
- -- (if it is in the map). If (f k x) is @ 'Nothing', the element is deleted.
256
- -- If it is (@ 'Just' y), the key k is bound to the new value y .
254
+ -- | /O(log n)/ The expression @( 'update' f k map)@ updates the value @x@ at @k@
255
+ -- (if it is in the map). If @ (f x)@ is 'Nothing', the element is deleted.
256
+ -- If it is @( 'Just' y)@ , the key @k@ is bound to the new value @y@ .
257
257
update :: (Eq k , Hashable k ) => (a -> Maybe a ) -> k -> HashMap k a -> HashMap k a
258
258
update f = alter (>>= f)
259
259
{-# INLINABLE update #-}
You can’t perform that action at this time.
0 commit comments