Help us shape the future of Go! Take the 2026 Go Developer Survey

generic

package
v1.1.84 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 4 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[GA ~func(A) A, A any](fa A) func(GA) A

func Chain added in v1.0.78

func Chain[ENDO ~func(GA) GA, GA ~func(A) A, A any](f GA) ENDO

func Compose

func Compose[ENDO ~func(A) A, A any](f1, f2 ENDO) ENDO

func Curry2 added in v1.0.79

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

Curry2 is a duplicate of [F.Curry2] but because of the type system it's not compatible otherwise

func Curry3 added in v1.0.79

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

Curry2 is a duplicate of [F.Curry2] but because of the type system it's not compatible otherwise

func Identity

func Identity[ENDO ~func(A) A, A any]() ENDO

func MonadAp added in v1.0.78

func MonadAp[GA ~func(A) A, A any](fab GA, fa A) A

func MonadChain added in v1.0.78

func MonadChain[GA ~func(A) A, A any](ma GA, f GA) GA

func Monoid

func Monoid[ENDO ~func(A) A, A any]() M.Monoid[ENDO]

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

func Of

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

Of converts any function to an [Endomorphism]

func Semigroup

func Semigroup[ENDO ~func(A) A, A any]() S.Semigroup[ENDO]

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, ENDO ~func(A) A, A any](f ENDO) F

Unwrap converts any [Endomorphism] to a normal function

func Wrap added in v1.0.96

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

Wrap converts any function to an [Endomorphism]

Types

This section is empty.

Jump to

Keyboard shortcuts

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