How do you use scalaz.WriterT for logging in a for expression?
问题 How do you use scalaz.WriterT for logging? 回答1: About monad transformers This is a very short introduction. You may find more information on haskellwiki or this great slide by @jrwest. Monads don't compose, meaning that if you have a monad A[_] and a monad B[_] , then A[B[_]] can not be derived automatically . However in most cases this can be achieved by having a so-called monad transformer for a given monad. If we have monad transformer BT for monad B , then we can compose a new monad A[B[_