
25 Aug
2012
25 Aug
'12
4:15 a.m.
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 transformers? Thanks