Replace liftM and fmap with <$>

This commit is contained in:
slotThe
2019-10-08 10:27:53 +02:00
parent f3024e6779
commit 53b57eba14
43 changed files with 95 additions and 95 deletions

View File

@@ -230,7 +230,7 @@ mapZ_ = mapZ . const
-- | Monadic version of 'mapZ'
mapZM :: Monad m => (Bool -> a -> m b) -> Zipper a -> m (Zipper b)
mapZM f as = fromTags `liftM` (mapM (mapEM f) . toTags) as
mapZM f as = fromTags <$> (mapM (mapEM f) . toTags) as
-- | Monadic version of 'mapZ_'
@@ -345,8 +345,8 @@ mapE_ = mapE . const
-- | Monadic version of 'mapE'
mapEM :: Monad m => (Bool -> a -> m b) -> Either a a -> m (Either b b)
mapEM f (Left a) = Left `liftM` f False a
mapEM f (Right a) = Right `liftM` f True a
mapEM f (Left a) = Left <$> f False a
mapEM f (Right a) = Right <$> f True a
mapEM_ :: Monad m => (a -> m b) -> Either a a -> m (Either b b)
mapEM_ = mapEM . const