endomorphism

package
v1.0.143 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ap added in v1.0.78

func Ap[A any](fa A) func(Endomorphism[A]) A

func Curry2 added in v1.0.79

func Curry2[FCT ~func(T0, T1) T1, T0, T1 any](f FCT) func(T0) Endomorphism[T1]

Curry2 curries a binary function

func Curry3 added in v1.0.79

func Curry3[FCT ~func(T0, T1, T2) T2, T0, T1, T2 any](f FCT) func(T0) func(T1) Endomorphism[T2]

Curry3 curries a ternary function

func MonadAp added in v1.0.78

func MonadAp[A any](fab Endomorphism[A], fa A) A

func Monoid

func Monoid[A any]() M.Monoid[Endomorphism[A]]

Monoid for the Endomorphism where the `concat` operation is the usual function composition.

func Semigroup

func Semigroup[A any]() S.Semigroup[Endomorphism[A]]

Semigroup for the Endomorphism where the `concat` operation is the usual function composition.

func Unwrap added in v1.0.96

func Unwrap[F ~func(A) A, A any](f Endomorphism[A]) F

Unwrap converts any Endomorphism to a function

Types

type Endomorphism added in v1.0.75

type Endomorphism[A any] func(A) A

Endomorphism is a function that

func Chain added in v1.0.78

func Chain[A any](f Endomorphism[A]) Endomorphism[Endomorphism[A]]

func Identity added in v1.0.75

func Identity[A any]() Endomorphism[A]

Identity returns the identity Endomorphism

func MonadChain added in v1.0.78

func MonadChain[A any](ma Endomorphism[A], f Endomorphism[A]) Endomorphism[A]

func Of added in v1.0.75

func Of[F ~func(A) A, A any](f F) Endomorphism[A]

Of converts any function to an Endomorphism

func Wrap added in v1.0.96

func Wrap[F ~func(A) A, A any](f F) Endomorphism[A]

Wrap converts any function to an Endomorphism

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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