title: Haskell (a -> m a) -> m (a -> a) -> m (a -> a)
body: <p>I've been digging into Haskell for the past months, I've run into a situation with monads that I am not quite sure how to handle.</p>
  
  <p>I have one value of type <code>a -&gt; m a</code> and a second of type <code>m (a -&gt; a)</code> and I need to compose them such that the result of the first ends up as the input into the of the second and produces a <code>m (a -&gt; a)</code> if possible. I've been stuck on this for the past day now and I'm not wrapping my head around it. I suppose that I am looking for a function like <code>(a -&gt; m a) -&gt; m (a -&gt; a) -&gt; m (a -&gt; a)</code>. I can provide a more concrete example if it makes more sense.</p>