generic

package
v1.0.136 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 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 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 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 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,
	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 IOEA_IN) SRIOEA

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 ~func(R) IOEA,

	RIOEA_IN ~func(R) IOEA_IN,

	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 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 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 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