Commit 91d95305 authored by Austin Seipp's avatar Austin Seipp
Browse files

Revert "Eta-expand argument to foldr in mapM_ for []"

This change lacked justification (or a test!) for its improvements, and
I merged it on a sweep of Phabricator without fixing this. Trac #10034.

This reverts commit 7cf87fc6.
parent 1b82619b
......@@ -349,8 +349,7 @@ for_ = flip traverse_
-- As of base, 'mapM_' is just 'traverse_', specialized to
-- 'Monad'.
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
{-# INLINE mapM_ #-}
mapM_ f = foldr (\m n -> f m >> n) (return ())
mapM_ f= foldr ((>>) . f) (return ())
-- | 'forM_' is 'mapM_' with its arguments flipped. For a version that
-- doesn't ignore the results see 'Data.Traversable.forM'.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment