Skip to content

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

Open
@igstan

Description

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions