jonathanfishbein1/numeric-typeclasses/3.0.1

NOTE: the latest version is 4.0.0

Group

Group typeclass definition and its instances for basic types.

Definition

type alias Group a =
{ monoid : Monoid a
, inverse : a -> a
}

Explicit typeclass which implements group operations for type a.

#Instances

numberSum : Group number

Construct an instance for any type which satisfies Elm's number magic constraint. Implements sum.

trivialGroup : Group ()

Construct trivial group

exclusiveOr : Group Bool

Construct exclusive Or

modularArithmetic : Int -> Group Int

Instance for modularArithmetic

floatProduct : Group Float

Implements product.