So we have an Abelian type and a Commutative typeclass, right? And categorically there's a forgetful functor from abelian groups to commutative monoids --- and that functor has a left adjoint, which is the Grothendieck group. We already have one free construction in the library, why not another? 😉
I kind of doubt this would be actually useful to anybody, but I also think of purescript-group as partially a vehicle to teach functional programmers about groups so they have more mental models for category theory, and this would accomplish that nicely.
So we have an
Abeliantype and aCommutativetypeclass, right? And categorically there's a forgetful functor from abelian groups to commutative monoids --- and that functor has a left adjoint, which is the Grothendieck group. We already have one free construction in the library, why not another? 😉I kind of doubt this would be actually useful to anybody, but I also think of
purescript-groupas partially a vehicle to teach functional programmers about groups so they have more mental models for category theory, and this would accomplish that nicely.