Documentation ¶
Index ¶
- func ApplicativeAssertHomomorphism[HKTA, HKTB, HKTFAB, A, B any](t *testing.T, eq E.Eq[HKTB], ...) func(a A) bool
- func ApplicativeAssertIdentity[HKTA, HKTFAA, A any](t *testing.T, eq E.Eq[HKTA], ...) func(fa HKTA) bool
- func ApplicativeAssertInterchange[HKTA, HKTB, HKTFAB, HKTABB, A, B any](t *testing.T, eq E.Eq[HKTB], ...) func(a A) bool
- func ApplicativeAssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], ...) func(a A) bool
- func AssertHomomorphism[HKTA, HKTB, HKTAB, A, B any](t *testing.T, eq E.Eq[HKTB], fofa func(A) HKTA, fofb func(B) HKTB, ...) func(a A) booldeprecated
- func AssertIdentity[HKTA, HKTAA, A any](t *testing.T, eq E.Eq[HKTA], fof func(func(A) A) HKTAA, ...) func(fa HKTA) booldeprecated
- func AssertInterchange[HKTA, HKTB, HKTAB, HKTABB, A, B any](t *testing.T, eq E.Eq[HKTB], fofa func(A) HKTA, fofab func(func(A) B) HKTAB, ...) func(a A) booldeprecated
- func AssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], ...) func(a A) booldeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicativeAssertHomomorphism ¶ added in v1.0.127
func ApplicativeAssertHomomorphism[HKTA, HKTB, HKTFAB, A, B any](t *testing.T, eq E.Eq[HKTB], apab applicative.Applicative[A, B, HKTA, HKTB, HKTFAB], pb pointed.Pointed[B, HKTB], pfab pointed.Pointed[func(A) B, HKTFAB], ab func(A) B, ) func(a A) bool
Applicative homomorphism law
A.ap(A.of(ab), A.of(a)) <-> A.of(ab(a))
func ApplicativeAssertIdentity ¶ added in v1.0.127
func ApplicativeAssertIdentity[HKTA, HKTFAA, A any](t *testing.T, eq E.Eq[HKTA], ap applicative.Applicative[A, A, HKTA, HKTA, HKTFAA], paa pointed.Pointed[func(A) A, HKTFAA], ) func(fa HKTA) bool
Applicative identity law
A.ap(A.of(a => a), fa) <-> fa
func ApplicativeAssertInterchange ¶ added in v1.0.127
func ApplicativeAssertInterchange[HKTA, HKTB, HKTFAB, HKTABB, A, B any](t *testing.T, eq E.Eq[HKTB], apab applicative.Applicative[A, B, HKTA, HKTB, HKTFAB], apabb applicative.Applicative[func(A) B, B, HKTFAB, HKTB, HKTABB], pabb pointed.Pointed[func(func(A) B) B, HKTABB], ab func(A) B, ) func(a A) bool
Applicative interchange law
A.ap(fab, A.of(a)) <-> A.ap(A.of(ab => ab(a)), fab)
func ApplicativeAssertLaws ¶ added in v1.0.127
func ApplicativeAssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], fofb pointed.Pointed[B, HKTB], fofaa pointed.Pointed[func(A) A, HKTAA], fofbc pointed.Pointed[func(B) C, HKTBC], fofabb pointed.Pointed[func(func(A) B) B, HKTABB], faa functor.Functor[A, A, HKTA, HKTA], fmap functor.Functor[func(B) C, func(func(A) B) func(A) C, HKTBC, HKTABAC], fapaa applicative.Applicative[A, A, HKTA, HKTA, HKTAA], fapab applicative.Applicative[A, B, HKTA, HKTB, HKTAB], fapbc apply.Apply[B, C, HKTB, HKTC, HKTBC], fapac apply.Apply[A, C, HKTA, HKTC, HKTAC], fapabb applicative.Applicative[func(A) B, B, HKTAB, HKTB, HKTABB], fapabac applicative.Applicative[func(A) B, func(A) C, HKTAB, HKTAC, HKTABAC], ab func(A) B, bc func(B) C, ) func(a A) bool
ApplicativeAssertLaws asserts the apply laws `identity`, `composition`, `associative composition`, 'applicative identity', 'homomorphism', 'interchange'
func AssertHomomorphism
deprecated
func AssertHomomorphism[HKTA, HKTB, HKTAB, A, B any](t *testing.T, eq E.Eq[HKTB], fofa func(A) HKTA, fofb func(B) HKTB, fofab func(func(A) B) HKTAB, fap func(HKTAB, HKTA) HKTB, ab func(A) B, ) func(a A) bool
Applicative homomorphism law
A.ap(A.of(ab), A.of(a)) <-> A.of(ab(a))
Deprecated: use ApplicativeAssertHomomorphism
func AssertIdentity
deprecated
func AssertInterchange
deprecated
func AssertInterchange[HKTA, HKTB, HKTAB, HKTABB, A, B any](t *testing.T, eq E.Eq[HKTB], fofa func(A) HKTA, fofab func(func(A) B) HKTAB, fofabb func(func(func(A) B) B) HKTABB, fapab func(HKTAB, HKTA) HKTB, fapabb func(HKTABB, HKTAB) HKTB, ab func(A) B, ) func(a A) bool
Applicative interchange law
A.ap(fab, A.of(a)) <-> A.ap(A.of(ab => ab(a)), fab)
Deprecated: use ApplicativeAssertInterchange
func AssertLaws
deprecated
func AssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], fofa func(A) HKTA, fofb func(B) HKTB, fofaa func(func(A) A) HKTAA, fofab func(func(A) B) HKTAB, fofbc func(func(B) C) HKTBC, fofabb func(func(func(A) B) B) HKTABB, 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, fapaa func(HKTAA, HKTA) HKTA, fapab func(HKTAB, HKTA) HKTB, fapbc func(HKTBC, HKTB) HKTC, fapac func(HKTAC, HKTA) HKTC, fapabb func(HKTABB, HKTAB) HKTB, fapabac func(HKTABAC, HKTAB) HKTAC, ab func(A) B, bc func(B) C, ) func(a A) bool
AssertLaws asserts the apply laws `identity`, `composition`, `associative composition`, 'applicative identity', 'homomorphism', 'interchange'
Deprecated: use ApplicativeAssertLaws instead
Types ¶
This section is empty.