title: What is monoid homomorphism exactly?
body: <p>I've read about monoid homomorphism from <a href="http://blog.higher-order.com/blog/2014/03/19/monoid-morphisms-products-coproducts/" rel="noreferrer">Monoid Morphisms, Products, and Coproducts</a> and could not understand 100%.  </p>
  
  <p>The author says (emphasis original):</p>
  
  <blockquote>
    <p>The <code>length</code> function maps from <code>String</code> to <code>Int</code> <em>while preserving the
    monoid structure</em>. Such a function, that maps from one monoid to
    another in such a preserving way, is called a <em>monoid homomorphism</em>. In
    general, for monoids <code>M</code> and <code>N</code>, a homomorphism <code>f: M =&gt; N</code>, and all values
    <code>x:M</code>, <code>y:M</code>, the following equations hold:  </p>
  
  <pre><code>f(x |+| y) == (f(x) |+| f(y))
  
  f(mzero[M]) == mzero[N]
  </code></pre>
  </blockquote>
  
  <p>Does he mean that, since the datatypes <code>String</code> and <code>Int</code> are monoids, and the function <code>length</code> maps <code>String =&gt; Int</code> preserving the monoid structure (<code>Int</code> is a monoid), it is called monoid homomorphism, right?</p>