Magma

trait Magma[A]

A magma is a set with a binary operation. The magma trait is a type class for magmas, which defines a single binary operation called op. If an implicit object of type Magma[A] is in scope, then a binary operator |+| corresponding to the magma operation is available for objects of type A.

Companion:
object
class Object
trait Matchable
class Any

Type members

Classlikes

class Ops(lhs: A)

Value members

Abstract methods

def op(x: A, y: A): A

The magma operation.

The magma operation.