From 291ef19ef212a07dbc4f08c7b248ae6df932f910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20G=2E=20Stan?= Date: Mon, 17 Jun 2024 14:40:12 +0300 Subject: [PATCH] Add `intercalate` on the Semigroup companion object --- kernel/src/main/scala/cats/kernel/Semigroup.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/src/main/scala/cats/kernel/Semigroup.scala b/kernel/src/main/scala/cats/kernel/Semigroup.scala index e861f481fe..cc96528c90 100644 --- a/kernel/src/main/scala/cats/kernel/Semigroup.scala +++ b/kernel/src/main/scala/cats/kernel/Semigroup.scala @@ -178,6 +178,9 @@ object Semigroup */ @inline def last[A]: Semigroup[A] = (_, y) => y + @inline def intercalate[A](sep: A)(implicit ev: Semigroup[A]): Semigroup[A] = + ev.intercalate(sep) + implicit def catsKernelBoundedSemilatticeForBitSet: BoundedSemilattice[BitSet] = cats.kernel.instances.bitSet.catsKernelStdSemilatticeForBitSet implicit def catsKernelInstancesForUnit: BoundedSemilattice[Unit] with CommutativeGroup[Unit] =