[Haskell-beginners] Difference between Monad composition and transformation
vxanica at gmail.com
Sat Aug 25 10:15:20 CEST 2012
When I use a State Monad transformer to combine with a Writer Monad
StateT s (Writer w) a. is it different from composition of State Monad and
Writer Monad. It is State s (Writer w a) ?
StateT is defined as (s -> m (a, s)), so StateT s (Writer w) a can be
regarded as (s -> Writer w a) , which is (s -> ((a,w),s)
and on the other hand State s (Writer w a) is (s -> ((a,w),s). I suppose
the are similar and if so, what is the point we still get Monad
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners