Documentation ¶ Index ¶ func Conform[A any, CA Class[A]](c CA) func(t *testing.T, x, y, z A) type Class type MEmptyFn type Type func NewType[A any](equalFn eq.EqualFn[A], sAssocFn semigroup.SAssocFn[A], mEmptyFn MEmptyFn[A]) Type[A] func (t Type[A]) MAppend(x, y A) A func (t Type[A]) MConcat(xs []A) A func (t Type[A]) MEmpty() A func (t Type[A]) SAssoc(x, y A) A Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Conform ¶ added in v0.0.4 func Conform[A any, CA Class[A]](c CA) func(t *testing.T, x, y, z A) Conform returns a function testing if the implementation abides by its laws. Types ¶ type Class ¶ type Class[A any] interface { semigroup.Class[A] MEmpty() A MAppend(A, A) A MConcat([]A) A } type MEmptyFn ¶ added in v0.0.4 type MEmptyFn[A any] func() A type Type ¶ added in v0.0.4 type Type[A any] struct { eq.Type[A] // contains filtered or unexported fields } func NewType ¶ added in v0.0.4 func NewType[A any]( equalFn eq.EqualFn[A], sAssocFn semigroup.SAssocFn[A], mEmptyFn MEmptyFn[A], ) Type[A] func (Type[A]) MAppend ¶ added in v0.0.4 func (t Type[A]) MAppend(x, y A) A func (Type[A]) MConcat ¶ added in v0.0.4 func (t Type[A]) MConcat(xs []A) A func (Type[A]) MEmpty ¶ added in v0.0.4 func (t Type[A]) MEmpty() A func (Type[A]) SAssoc ¶ added in v0.0.4 func (t Type[A]) SAssoc(x, y A) A Source Files ¶ View all Source files monoid.go Click to show internal directories. Click to hide internal directories.