Skip to content

Commit

Permalink
Add intercalate on the Semigroup companion object
Browse files Browse the repository at this point in the history
  • Loading branch information
igstan committed Dec 24, 2024
1 parent dd89133 commit 291ef19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/src/main/scala/cats/kernel/Semigroup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down

0 comments on commit 291ef19

Please sign in to comment.