cats
cats copied to clipboard
Any reason `intercalate` isn't exposed directly on the `Semigroup` companion object?
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?