The default implementation of UnorderedFoldable#isEmpty (and thus nonEmpty) seems to be incorrect.
val inst: cats.UnorderedFoldable[Set] = new cats.UnorderedFoldable[Set] {
def unorderedFoldMap[A, B](s: Set[A])(f: A => B)(implicit B: cats.kernel.CommutativeMonoid[B]): B =
cats.instances.set.catsStdInstancesForSet.unorderedFoldMap(s)(f)
}
inst.isEmpty(Set.empty) // returns false
Ouch. It looks like the implementations of isEmpty and nonEmpty are switched around. The fix is easy, but we should also add some tests for this. This is a super busy week for me. Does anybody want to give it a go?
I can help with this if that's ok
closed by #2586
Most helpful comment
I can help with this if that's ok