### Writer? I hardly knew her!

Whereas the Maybe monad is for values with an added context of failure, and the list monad is for nondeterministic values, Writer monad is for values that have another value attached that acts as a sort of log value.

### Writer

To attach a monoid to a value, we just need to put them together in a tuple. The Writer w a type is just a newtype wrapper for this.

scalaz中，可以用这种方法构造一个Writer

#### WriterT

set的操作是通过WriterOps注入的，

#### Using for syntax with Writer

Now that we have a Monad instance, we’re free to use do notation for Writer values.