354612 (1) [Avatar] Offline
#1
10.6.2 Using composed monoids to fuse traversals has a typo:

scala> val m = productMonoid(intAddition, intAddition)
m: Monoid[(Int, Int)] = $anon$1@8ff557a
scala> val p = listFoldable.foldMap(List(1,2,3,4))(a => (1, a))(m)
p: (Int, Int) = (4, 10)
scala> val mean = p._1 / p._2.toDouble
mean: Double = 2.5


it should be 10/4.0:

scala> val mean = p._2 / p._1.toDouble