
28 Dec
2012
28 Dec
'12
1:30 a.m.
On 12/28/12 1:20 AM, Michael Snoyman wrote:
+1 for moving semigroups into the platform, but what's the motivation for removing First and Last from Data.Monoid?
Because they're properly represented as semigroups too, just like Min and Max (i.e. they don't behave sensibly "out of the box" on empty lists). The semigroups package already provides the proper types and instances. And just like Min and Max, the semigroups package lets you "lift" its First and Last into Monoids with the Option type. --Gershom