Group

class Group[a: Type] with Monoid[a]Source

A trait for types that form a group.

The default instances for numbers define the additive inverse in the real numbers.

Signatures

def inverse(x: a): a with Group[a] Source

Returns the inverse element of x.

Class Definitions

def combine(x: a, y: a): a with Group[a] Source

Returns the result of combining x and y using Monoid's combine.

def empty(_unit: Unit): a with Group[a] Source

Returns the neutral element.

def remove(x: a, y: a): a with Group[a] Source

Returns y removed from x.

Equivalent to Group.combine(x, Group.inverse(y))