Monoid

com.phasmid.majabigwaduce.core.Monoid
See theMonoid companion object
trait Monoid[X] extends Zero[X]

Type parameters

X

the type which we want to create a monoid value for. Created by scalaprof on 10/5/16.

Attributes

Companion
object
Graph
Supertypes
trait Zero[X]
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object MonoidDouble
object MonoidInt
object MonoidString
trait IterableMonoid[T]

Members list

Value members

Abstract methods

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

This is the "op" method of a Monoid, the one that associates any two instances of the monoid type.

This is the "op" method of a Monoid, the one that associates any two instances of the monoid type.

Value parameters

x

the left-hand operand

y

the right-hand operand

Attributes

Returns

the result of combining x and y

Inherited and Abstract methods

def zero: X

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:
Zero