title: Haskell: Can't figure out how to use monad transformer stack
body: <p>I have a type</p>
  
  <pre><code>type T s r a = StateT [s] (ListT (Reader r)) a
  </code></pre>
  
  <p>I'd like to create a monadic value that yields each of the current states</p>
  
  <pre><code>states :: T a r a
  </code></pre>
  
  <p>But I'm feeling stupid today, and I can't figure out how to transform a value of <code>T a r [a]</code> to <code>T a r a</code>.</p>
  
  <pre><code>states = do
    as &lt;- get
    -- insert magic
    return a
  </code></pre>