Using M monoid instead of the one from the Writer monoid blog post.