cats icon indicating copy to clipboard operation
cats copied to clipboard

Any reason `intercalate` isn't exposed directly on the `Semigroup` companion object?

Open igstan opened this issue 8 months ago • 3 comments

Is there a reason not to expose the intercalate method directly on the Semigroup object?

object Semigroup {
  @inline def intercalate[A](sep: A)(implicit ev: Semigroup[A]): Semigroup[A] =
    ev.intercalate(sep)
}

It provides some type inference convenience in that we can now write Semigroup.intercalate(";"), for example, instead of Semigroup[String].intercalate(";").

Am I missing something or is it just an oversight?

igstan avatar Jun 10 '24 18:06 igstan