Commit 29f4ac81 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

Use nicer type variables in foldlM's type sig

parent 9a1890d4
......@@ -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
......
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