monad

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: 3 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,

	MF M[func(A) A],
	MA M[A],

	CA Class[
		A,
		A,
		A,

		MF,

		MA,
		MA,
		MA,
	],
](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,

	MF M[func(A) B],

	MA M[A],
	MB M[B],
	MC M[C],
] interface {
	applicative.Class[A, B, C, MF, MA, MB, MC]

	// >>=
	Bind(MA, func(A) MB) MB

	// >>
	Then(MA, MB) MB

	Return(A) MA
}

type M

type M[T any] interface{}

Jump to

Keyboard shortcuts

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