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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ap added in v1.0.135

func Ap[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	SRIOEAB ~func(S) RIOEAB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	RIOEAB ~func(R) IOEAB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEAB ~func() ET.Either[E, P.Pair[func(A) B, S]],
	S, R, E, A, B any,
](fa SRIOEA) func(SRIOEAB) SRIOEB

func Applicative added in v1.0.135

func Applicative[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	SRIOEAB ~func(S) RIOEAB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	RIOEAB ~func(R) IOEAB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEAB ~func() ET.Either[E, P.Pair[func(A) B, S]],
	S, R, E, A, B any,
]() applicative.Applicative[A, B, SRIOEA, SRIOEB, SRIOEAB]

Applicative implements the applicative operations for [StateReaderIOEither]

func Asks added in v1.0.137

func Asks[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R, E, A any,
](f func(R) SRIOEA) SRIOEA

func Chain

func Chain[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) SRIOEB) func(SRIOEA) SRIOEB

func ChainEitherK added in v1.0.137

func ChainEitherK[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) ET.Either[E, B]) func(SRIOEA) SRIOEB

func ChainIOEitherK added in v1.0.137

func ChainIOEitherK[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,
	IOEB_IN ~func() ET.Either[E, B],
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) IOEB_IN) func(SRIOEA) SRIOEB

func ChainReaderIOEitherK added in v1.0.137

func ChainReaderIOEitherK[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEB_IN ~func() ET.Either[E, B],
	S, R, E, A, B any,
](f func(A) RIOEB_IN) func(SRIOEA) SRIOEB

func Eq added in v1.0.135

func Eq[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R, E, A any](eqr EQ.Eq[RIOEA]) func(S) EQ.Eq[SRIOEA]

Eq implements the equals predicate for values contained in the [StateReaderIOEither] monad

func FromEither added in v1.0.136

func FromEither[
	SRIOEA ~func(S) RIOEA,

	RIOEA ~func(R) IOEA,

	IOEA ~func() ET.Either[E, P.Pair[A, S]],

	S, R, E, A any,
](ma ET.Either[E, A]) SRIOEA

func FromEitherK added in v1.0.137

func FromEitherK[
	SRIOEB ~func(S) RIOEB,
	RIOEB ~func(R) IOEB,
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) ET.Either[E, B]) func(A) SRIOEB

func FromIO added in v1.0.136

func FromIO[
	SRIOEA ~func(S) RIOEA,
	RIOEA_IN ~func(R) IOEA_IN,

	IO_IN ~func() A,

	RIOEA ~func(R) IOEA,

	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEA_IN ~func() ET.Either[E, A],

	S, R, E, A any,
](fa IO_IN) SRIOEA

func FromIOEither added in v1.0.136

func FromIOEither[
	SRIOEA ~func(S) RIOEA,
	RIOEA_IN ~func(R) IOEA_IN,
	IOEA_IN ~func() ET.Either[E, A],
	RIOEA ~func(R) IOEA,

	IOEA ~func() ET.Either[E, P.Pair[A, S]],

	S, R, E, A any,
](fa IOEA_IN) SRIOEA

func FromIOEitherK added in v1.0.137

func FromIOEitherK[
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,
	IOEB_IN ~func() ET.Either[E, B],
	RIOEB ~func(R) IOEB,
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) IOEB_IN) func(A) SRIOEB

func FromIOK added in v1.0.137

func FromIOK[
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,

	IOB_IN ~func() B,

	RIOEB ~func(R) IOEB,

	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEB_IN ~func() ET.Either[E, B],

	S, R, E, A, B any,
](f func(A) IOB_IN) func(A) SRIOEB

func FromReader added in v1.0.136

func FromReader[
	SRIOEA ~func(S) RIOEA,
	RIOEA_IN ~func(R) IOEA_IN,

	R_IN ~func(R) A,

	RIOEA ~func(R) IOEA,

	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEA_IN ~func() ET.Either[E, A],

	S, R, E, A any,
](fa R_IN) SRIOEA

func FromReaderEither added in v1.0.136

func FromReaderEither[
	SRIOEA ~func(S) RIOEA,
	RIOEA_IN ~func(R) IOEA_IN,
	RIOEA ~func(R) IOEA,

	REA_IN ~func(R) ET.Either[E, A],

	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEA_IN ~func() ET.Either[E, A],

	S, R, E, A any,
](fa REA_IN) SRIOEA

func FromReaderIOEither added in v1.0.136

func FromReaderIOEither[
	SRIOEA ~func(S) RIOEA,
	RIOEA_IN ~func(R) IOEA_IN,

	RIOEA ~func(R) IOEA,

	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEA_IN ~func() ET.Either[E, A],

	S, R, E, A any,
](fa RIOEA_IN) SRIOEA

func FromReaderIOEitherK added in v1.0.137

func FromReaderIOEitherK[
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,
	IOEB_IN ~func() ET.Either[E, B],
	RIOEB ~func(R) IOEB,
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) RIOEB_IN) func(A) SRIOEB

func FromState added in v1.0.136

func FromState[
	SRIOEA ~func(S) RIOEA,
	STATE ~func(S) P.Pair[A, S],
	RIOEA ~func(R) IOEA,

	IOEA ~func() ET.Either[E, P.Pair[A, S]],

	S, R, E, A any,
](fa STATE) SRIOEA

func FromStrictEquals added in v1.0.135

func FromStrictEquals[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R any, E, A comparable]() func(R) func(S) EQ.Eq[SRIOEA]

FromStrictEquals constructs an [EQ.Eq] from the canonical comparison function

func Functor added in v1.0.135

func Functor[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
]() functor.Functor[A, B, SRIOEA, SRIOEB]

Functor implements the functor operations for [StateReaderIOEither]

func Left added in v1.0.136

func Left[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R, E, A any,
](e E) SRIOEA

func Local added in v1.0.137

func Local[
	SR1IOEA ~func(S) R1IOEA,
	SR2IOEA ~func(S) R2IOEA,
	R1IOEA ~func(R1) IOEA,
	R2IOEA ~func(R2) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R1, R2, E, A any,
](f func(R2) R1) func(SR1IOEA) SR2IOEA

func Map

func Map[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](f func(A) B) func(SRIOEA) SRIOEB

func Monad added in v1.0.135

func Monad[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	SRIOEAB ~func(S) RIOEAB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	RIOEAB ~func(R) IOEAB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEAB ~func() ET.Either[E, P.Pair[func(A) B, S]],
	S, R, E, A, B any,
]() monad.Monad[A, B, SRIOEA, SRIOEB, SRIOEAB]

Monad implements the monadic operations for [StateReaderIOEither]

func MonadAp added in v1.0.135

func MonadAp[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	SRIOEAB ~func(S) RIOEAB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	RIOEAB ~func(R) IOEAB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEAB ~func() ET.Either[E, P.Pair[func(A) B, S]],
	S, R, E, A, B any,
](fab SRIOEAB, fa SRIOEA) SRIOEB

func MonadChain

func MonadChain[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](fa SRIOEA, f func(A) SRIOEB) SRIOEB

func MonadChainEitherK added in v1.0.137

func MonadChainEitherK[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](ma SRIOEA, f func(A) ET.Either[E, B]) SRIOEB

func MonadChainIOEitherK added in v1.0.137

func MonadChainIOEitherK[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,
	IOEB_IN ~func() ET.Either[E, B],
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](ma SRIOEA, f func(A) IOEB_IN) SRIOEB

func MonadChainReaderIOEitherK added in v1.0.137

func MonadChainReaderIOEitherK[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEB_IN ~func(R) IOEB_IN,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	IOEB_IN ~func() ET.Either[E, B],
	S, R, E, A, B any,
](ma SRIOEA, f func(A) RIOEB_IN) SRIOEB

func MonadMap

func MonadMap[
	SRIOEA ~func(S) RIOEA,
	SRIOEB ~func(S) RIOEB,
	RIOEA ~func(R) IOEA,
	RIOEB ~func(R) IOEB,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	IOEB ~func() ET.Either[E, P.Pair[B, S]],
	S, R, E, A, B any,
](fa SRIOEA, f func(A) B) SRIOEB

func Of

func Of[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R, E, A any,
](a A) SRIOEA

func Pointed added in v1.0.135

func Pointed[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R, E, A any,
]() pointed.Pointed[A, SRIOEA]

Pointed implements the pointed operations for [StateReaderIOEither]

func Right[
	SRIOEA ~func(S) RIOEA,
	RIOEA ~func(R) IOEA,
	IOEA ~func() ET.Either[E, P.Pair[A, S]],
	S, R, E, A any,
](a A) SRIOEA

Types

This section is empty.

Jump to

Keyboard shortcuts

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