title: How to nondeterministically put a value in a state?
body: <p>In the following code, how can I replace <code>put 1</code> with some code that insert nondeterministically 1 or 2 in the state?</p>
  
  <pre><code>import Control.Monad.List
  import Control.Monad.Trans.State
  
  test :: StateT Int [] Int
  test = do
    put 1
    v &lt;- get
    return v
  </code></pre>