I noticed that some monads, e.g. Writer
, are defined in scalaz
as monad transformers of Identity
monad. Why is that ?
Asked
Active
Viewed 48 times
0

Michael
- 41,026
- 70
- 193
- 341
-
2Identity 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