[Haskell-cafe] Monad fold
maydwell at gmail.com
Tue Apr 16 14:47:36 CEST 2013
You could do:
runKleisli . mconcat . map Kleisli :: Monoid (Kleisli m a b) => [a -> m b]
-> a -> m b
Would that work for you?
On Tue, Apr 16, 2013 at 8:35 PM, Christopher Howard <
christopher.howard at frigidcode.com> wrote:
> So, I'm doing something like this
> foldl (>>=) someA list :: Monad m => m a
> list :: Monad m => [a -> m a],
> someA :: Monad m => m a
> Is there a more concise way to write this? I don't think foldM is what I
> want -- or is it?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe