applicative

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conform added in v0.0.5

func Conform[
	A any,

	FF F[func(A) A],
	FA F[A],

	CA Class[
		A,
		A,
		A,

		FF,

		FA,
		FA,
		FA,
	],
](c CA) func(t *testing.T, x A)

Conform returns a function testing if the implementation abides by its laws.

Types

type Class

type Class[
	A any,
	B any,
	C any,

	FF F[func(A) B],

	FA F[A],
	FB F[B],
	FC F[C],
] interface {
	functor.Class[A, B, FA, FB]

	Pure(A) FA

	// <*>
	Apply(FF, FA) FB

	LiftA2(func(A, B) C, FA, FB) FC

	// *>
	ApplyR(FA, FB) FB

	// <*
	ApplyL(FA, FB) FA
}

type F

type F[T any] interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL