Hello,
I have a a data structure composed all by numerical values, so that for each member I can generate a semigroup
case class A(x:Int, y:Int)
Thanks to shapeless-spire one can auto generate monoids for this data structures. Is there a typeclass that performs the average (if exists) and how to autogenerate it?
I have solved my problem by performing a reduce on the collection, adding the items and then dividing all the members properties of the final value by the length of the collection, but I am hoping for a more elegant solution