Exercise for the second monad chapter. Writer