<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">{- From: http://en.wikibooks.org/wiki/Haskell/Monad_transformers<br>if for instance we apply StateT to the List monad, a function that returns a list (i.e., a computation in the List monad) can be lifted into StateT s [], where it becomes a function that returns a StateT (s -&gt; [(a,s)]). That is, the lifted computation produces multiple (value,state) pairs from its input state.<br>-}<br><br>import Control.Monad.Trans.State.Lazy<br><br>type GeneratorState = StateT Int<br><br>-- a function in the list monad<br>f :: Int -&gt; [Int]<br>f n = [0..n]<br><br>Will someone please demonstrate the above comment from the wiki page.<br><br>Michael<br><br></td></tr></table><br>