Documentation ¶
Index ¶
- func AssertAssociativity[HKTA, HKTB, HKTC, A, B, C any](t *testing.T, eq E.Eq[HKTC], fofb func(B) HKTB, fofc func(C) HKTC, ...) func(fa HKTA) booldeprecated
- func AssertLaws[HKTA, HKTB, HKTC, HKTAB, HKTBC, HKTAC, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqc E.Eq[HKTC], fofb func(B) HKTB, ...) func(fa HKTA) booldeprecated
- func ChainAssertAssociativity[HKTA, HKTB, HKTC, HKTAB, HKTAC, HKTBC, A, B, C any](t *testing.T, eq E.Eq[HKTC], fofb pointed.Pointed[B, HKTB], ...) func(fa HKTA) bool
- func ChainAssertLaws[HKTA, HKTB, HKTC, HKTAB, HKTBC, HKTAC, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqc E.Eq[HKTC], fofb pointed.Pointed[B, HKTB], ...) func(fa HKTA) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAssociativity
deprecated
func AssertAssociativity[HKTA, HKTB, HKTC, A, B, C any](t *testing.T, eq E.Eq[HKTC], fofb func(B) HKTB, fofc func(C) HKTC, chainab func(HKTA, func(A) HKTB) HKTB, chainac func(HKTA, func(A) HKTC) HKTC, chainbc func(HKTB, func(B) HKTC) HKTC, ab func(A) B, bc func(B) C, ) func(fa HKTA) bool
Chain associativity law
F.chain(F.chain(fa, afb), bfc) <-> F.chain(fa, a => F.chain(afb(a), bfc))
Deprecated: use ChainAssertAssociativity instead
func AssertLaws
deprecated
func AssertLaws[HKTA, HKTB, HKTC, HKTAB, HKTBC, HKTAC, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqc E.Eq[HKTC], fofb func(B) HKTB, fofc func(C) HKTC, fofab func(func(A) B) HKTAB, fofbc func(func(B) C) HKTBC, faa func(HKTA, func(A) A) HKTA, fab func(HKTA, func(A) B) HKTB, fac func(HKTA, func(A) C) HKTC, fbc func(HKTB, func(B) C) HKTC, fmap func(HKTBC, func(func(B) C) func(func(A) B) func(A) C) HKTABAC, chainab func(HKTA, func(A) HKTB) HKTB, chainac func(HKTA, func(A) HKTC) HKTC, chainbc func(HKTB, func(B) HKTC) HKTC, fapab func(HKTAB, HKTA) HKTB, fapbc func(HKTBC, HKTB) HKTC, fapac func(HKTAC, HKTA) HKTC, fapabac func(HKTABAC, HKTAB) HKTAC, ab func(A) B, bc func(B) C, ) func(fa HKTA) bool
AssertLaws asserts the apply laws `identity`, `composition`, `associative composition` and `associativity`
Deprecated: use ChainAssertLaws instead
func ChainAssertAssociativity ¶ added in v1.0.127
func ChainAssertAssociativity[HKTA, HKTB, HKTC, HKTAB, HKTAC, HKTBC, A, B, C any](t *testing.T, eq E.Eq[HKTC], fofb pointed.Pointed[B, HKTB], fofc pointed.Pointed[C, HKTC], chainab chain.Chainable[A, B, HKTA, HKTB, HKTAB], chainac chain.Chainable[A, C, HKTA, HKTC, HKTAC], chainbc chain.Chainable[B, C, HKTB, HKTC, HKTBC], ab func(A) B, bc func(B) C, ) func(fa HKTA) bool
Chain associativity law
F.chain(F.chain(fa, afb), bfc) <-> F.chain(fa, a => F.chain(afb(a), bfc))
func ChainAssertLaws ¶ added in v1.0.127
func ChainAssertLaws[HKTA, HKTB, HKTC, HKTAB, HKTBC, HKTAC, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqc E.Eq[HKTC], fofb pointed.Pointed[B, HKTB], fofc pointed.Pointed[C, HKTC], fofab pointed.Pointed[func(A) B, HKTAB], fofbc pointed.Pointed[func(B) C, HKTBC], faa functor.Functor[A, A, HKTA, HKTA], fmap functor.Functor[func(B) C, func(func(A) B) func(A) C, HKTBC, HKTABAC], chainab chain.Chainable[A, B, HKTA, HKTB, HKTAB], chainac chain.Chainable[A, C, HKTA, HKTC, HKTAC], chainbc chain.Chainable[B, C, HKTB, HKTC, HKTBC], fapabac apply.Apply[func(A) B, func(A) C, HKTAB, HKTAC, HKTABAC], ab func(A) B, bc func(B) C, ) func(fa HKTA) bool
ChainAssertLaws asserts the apply laws `identity`, `composition`, `associative composition` and `associativity`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.