MonoidString

com.phasmid.majabigwaduce.core.Monoid.MonoidString
object MonoidString extends StringZero, Monoid[String]

Provides an implicit instance of Monoid for the String type, with behavior defined as string concatenation and an empty string as the identity element.

This implementation extends Zero.StringZero, inheriting the zero value for String.

Attributes

Graph
Supertypes
trait Monoid[String]
trait StringZero
trait Zero[String]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def combine(x: String, y: String): String

Combines two strings by concatenating them.

Combines two strings by concatenating them.

Value parameters

x

the first string to be combined

y

the second string to be combined

Attributes

Returns

a new string resulting from the concatenation of the input strings

def empty: String

Returns the identity element for the monoid operation on String.

Returns the identity element for the monoid operation on String.

Attributes

Returns

an empty String, which serves as the identity element.

Inherited methods

def zero: String

Method to create a zero/empty/nothing value of X

Method to create a zero/empty/nothing value of X

Attributes

Returns

an X which is zero (empty, etc.)

Inherited from:
StringZero