Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use nicer type variables in foldlM's type sig

  • Loading branch information...
commit 60ef83aceccff7bd260ce48f97522b4a3d8a98df 1 parent f703e97
@igfoo igfoo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Data/Foldable.hs
View
2  Data/Foldable.hs
@@ -195,7 +195,7 @@ foldrM f z0 xs = foldl f' return xs z0
-- | Monadic fold over the elements of a structure,
-- associating to the left, i.e. from left to right.
-foldlM :: (Foldable t, Monad m) => (a -> b -> m a) -> a -> t b -> m a
+foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
foldlM f z0 xs = foldr f' return xs z0
where f' x k z = f z x >>= k
Please sign in to comment.
Something went wrong with that request. Please try again.