What's the practical value of all those newtype wrappers in `Data.Monoid`?
问题 When looking at Data.Monoid , I see there are various newtype wrappers, such as All , Sum , or Product , which encode various kinds of monoids. However, when trying to use those wrappers, I can't help but wonder what's the benefit over using their non- Data.Monoid counterparts. For instance, compare the rather cumbersome summation print $ getSum $ mconcat [ Sum 33, Sum 2, Sum 55 ] vs. the more succinct idiomatic variant print $ sum [ 33, 2, 55 ] But what's the point? Is there any practical