Monadic transformation on a list, done in three ways
I'd say that the idiomatic way to write this function in Haskell is by composing a more primitive one with a map. Indeed, given the type signature of meh, it is very tempting to "prepare" a list of all the m b actions and then combine them in order:

meh :: Monad m =&gt; [a] -&gt; (a -&gt; m b) -&gt; m [b]
meh xs f = combine (f &lt;$&gt; xs)


Now, combine has type [m b] -&gt; m [b]. To process that list, we can use a fold. You have used foldl in your examples but you ended up reversing the list which is a clear sign that you may have wanted a foldr instead. And we can indeed do that:

combine :: Monad m =&gt; [m b] -&gt; m [b]
combine = foldr (\ x xs -&gt; (:) &lt;$&gt; x &lt;*&gt; xs) (return [])


Here the functor (&lt;$&gt;) and applicative (&lt;*&gt;) combinators allow to write something that looks a bit direct style (we are basically using (:) to construct a list by giving its head and tail) but that takes care of the monadic actions.