0

I noticed that some monads, e.g. Writer, are defined in scalaz as monad transformers of Identity monad. Why is that ?

Michael
  • 41,026
  • 70
  • 193
  • 341
  • 2
    Identity does nothing, `flatMap` is just a function application and using it in transformers just gives you original functionality of a monad. So, e.g Writer is isomorphic to WriterT[Id], and Reader is just a Kleisli[Id] – 4lex1v Mar 12 '14 at 18:33
  • @AlexIv Thank you. It makes sense. I did not get it entirely but I will think it over. – Michael Mar 12 '14 at 18:37

0 Answers0