3 ms·
As an aside, note that this isn't the recommended way to make Int an instance of Monoid, since there is another, equally valid definition using '1' and '*'. The
by hesselink 16y ago
As an aside, note that this isn't the recommended way to make Int an instance of Monoid, since there is another, equally valid definition using '1' and '*'. The recommended way is to make a newtype. In fact, the Sum and Product newtypes are already defined in Data.Monoid for this reason.