On Jul 26, 3:26 pm, Bill Atkins <watk...@alum.rpi.edu> wrote:
> Can you post an example of your code?

Without getting into the complexities, one simple example is a fold
where the step function returns results in a monad.
I have taken to replacing the fold in that case with a recursive
function, which surely is the wrong approach. I think foldM might do
the job but am unsure.

But as I said, that is just an example. I keep wanting to apply the
usual list tools but find that they do not work inside a monad. I find
myself wishing that f (m [a]) just automatically returned m f([a])
without me needing to do anything but I expect that there are reasons
why that is not a good idea.

Kevin



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to