Module

Data.Group

Package
purescript-group
Repository
morganthomas/purescript-group

#Group Source

class (Monoid g) <= Group g  where

A Group is a Monoid with inverses. Instances must satisfy the following law in addition to the monoid laws:

  • Inverse: forall x. ginverse x <> x = mempty = x <> ginverse x

Members

Instances

#Abelian Source

type Abelian a b = Group a => Commutative a => b

An Abelian group is a group with a commutative operation.

#power Source

power :: forall g. Group g => g -> Int -> g

Append a value (or its inverse) to itself a certain number of times.

For the Additive Int type, this is the same as multiplication.