Documentation
¶
Index ¶
- func Ap[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](ma GA) func(GAB) GB
- func ApFirst[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](second GB) func(GA) GA
- func ApSecond[GA ~func() A, GB ~func() B, GBB ~func() func(B) B, A, B any](second GB) func(GA) GB
- func ApplicativeMonoid[GA ~func() A, A any](m M.Monoid[A]) M.Monoid[GA]
- func ApplySemigroup[GA ~func() A, A any](s S.Semigroup[A]) S.Semigroup[GA]
- func Chain[GA ~func() A, GB ~func() B, A, B any](f func(A) GB) func(GA) GB
- func ChainFirst[GA ~func() A, GB ~func() B, A, B any](f func(A) GB) func(GA) GA
- func ChainTo[GA ~func() A, GB ~func() B, A, B any](fb GB) func(GA) GB
- func Defer[GA ~func() A, A any](gen func() GA) GA
- func Delay[GA ~func() A, A any](delay time.Duration) func(GA) GA
- func Eq[GA ~func() A, A any](e EQ.Eq[A]) EQ.Eq[GA]
- func Flatten[GA ~func() A, GAA ~func() GA, A any](mma GAA) GA
- func FromIO[GA ~func() A, A any](a GA) GA
- func FromImpure[GA ~func() any, IMP ~func()](f IMP) GA
- func Logf[GA ~func() any, A any](prefix string) func(A) GA
- func Logger[GA ~func() any, A any](loggers ...*log.Logger) func(string) func(A) GA
- func MakeIO[GA ~func() A, A any](f func() A) GA
- func Map[GA ~func() A, GB ~func() B, A, B any](f func(A) B) func(GA) GB
- func MapTo[GA ~func() A, GB ~func() B, A, B any](b B) func(GA) GB
- func Memoize[GA ~func() A, A any](ma GA) GA
- func MonadAp[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GB
- func MonadApFirst[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GA
- func MonadApSecond[GA ~func() A, GB ~func() B, GBB ~func() func(B) B, A, B any](first GA, second GB) GB
- func MonadChain[GA ~func() A, GB ~func() B, A, B any](fa GA, f func(A) GB) GB
- func MonadChainFirst[GA ~func() A, GB ~func() B, A, B any](fa GA, f func(A) GB) GA
- func MonadChainTo[GA ~func() A, GB ~func() B, A, B any](fa GA, fb GB) GB
- func MonadMap[GA ~func() A, GB ~func() B, A, B any](fa GA, f func(A) B) GB
- func MonadMapTo[GA ~func() A, GB ~func() B, A, B any](fa GA, b B) GB
- func MonadOf[GA ~func() A, A any](a A) GA
- func MonadTraverseArray[GB ~func() B, GBS ~func() BBS, AAS ~[]A, BBS ~[]B, A, B any](tas AAS, f func(A) GB) GBS
- func MonadTraverseRecord[GB ~func() B, GBS ~func() MB, MA ~map[K]A, MB ~map[K]B, K comparable, A, B any](ma MA, f func(A) GB) GBS
- func Now[GA ~func() time.Time]() GA
- func Of[GA ~func() A, A any](a A) GA
- func Retrying[GA ~func() A, A any](policy R.RetryPolicy, action func(R.RetryStatus) GA, check func(A) bool) GA
- func SequenceArray[GA ~func() A, GAS ~func() AAS, AAS ~[]A, GAAS ~[]GA, A any](tas GAAS) GAS
- func SequenceRecord[GA ~func() A, GAS ~func() AAS, AAS ~map[K]A, GAAS ~map[K]GA, K comparable, ...](tas GAAS) GAS
- func SequenceT1[GA ~func() A, GTA ~func() T.Tuple1[A], A any](a GA) GTA
- func SequenceT2[GA ~func() A, GB ~func() B, GTAB ~func() T.Tuple2[A, B], A, B any](a GA, b GB) GTAB
- func SequenceT3[GA ~func() A, GB ~func() B, GC ~func() C, GTABC ~func() T.Tuple3[A, B, C], ...](a GA, b GB, c GC) GTABC
- func SequenceT4[GA ~func() A, GB ~func() B, GC ~func() C, GD ~func() D, ...](a GA, b GB, c GC, d GD) GTABCD
- func TraverseArray[GB ~func() B, GBS ~func() BBS, AAS ~[]A, BBS ~[]B, A, B any](f func(A) GB) func(AAS) GBS
- func TraverseRecord[GB ~func() B, GBS ~func() MB, MA ~map[K]A, MB ~map[K]B, K comparable, A, B any](f func(A) GB) func(MA) GBS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApFirst ¶
func ApFirst[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](second GB) func(GA) GA
ApFirst combines two effectful actions, keeping only the result of the first.
func ApSecond ¶
func ApSecond[GA ~func() A, GB ~func() B, GBB ~func() func(B) B, A, B any](second GB) func(GA) GB
ApSecond combines two effectful actions, keeping only the result of the second.
func Chain ¶
func Chain[GA ~func() A, GB ~func() B, A, B any](f func(A) GB) func(GA) GB
Chain composes computations in sequence, using the return value of one computation to determine the next computation.
func ChainFirst ¶
func ChainFirst[GA ~func() A, GB ~func() B, A, B any](f func(A) GB) func(GA) GA
ChainFirst composes computations in sequence, using the return value of one computation to determine the next computation and keeping only the result of the first.
func ChainTo ¶
func ChainTo[GA ~func() A, GB ~func() B, A, B any](fb GB) func(GA) GB
ChainTo composes computations in sequence, ignoring the return value of the first computation
func Defer ¶
func Defer[GA ~func() A, A any](gen func() GA) GA
Defer creates an IO by creating a brand new IO via a generator function, each time
func FromImpure ¶
func FromImpure[GA ~func() any, IMP ~func()](f IMP) GA
FromImpure converts a side effect without a return value into a side effect that returns any
func Memoize ¶
func Memoize[GA ~func() A, A any](ma GA) GA
Memoize computes the value of the provided IO monad lazily but exactly once
func MonadAp ¶
func MonadAp[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GB
MonadAp implements the `ap` operation. Depending on a feature flag this will be sequential or parallel, the preferred implementation is parallel
func MonadApFirst ¶
func MonadApFirst[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GA
MonadApFirst combines two effectful actions, keeping only the result of the first.
func MonadApSecond ¶
func MonadApSecond[GA ~func() A, GB ~func() B, GBB ~func() func(B) B, A, B any](first GA, second GB) GB
MonadApSecond combines two effectful actions, keeping only the result of the second.
func MonadChain ¶
func MonadChain[GA ~func() A, GB ~func() B, A, B any](fa GA, f func(A) GB) GB
MonadChain composes computations in sequence, using the return value of one computation to determine the next computation.
func MonadChainFirst ¶
func MonadChainFirst[GA ~func() A, GB ~func() B, A, B any](fa GA, f func(A) GB) GA
MonadChainFirst composes computations in sequence, using the return value of one computation to determine the next computation and keeping only the result of the first.
func MonadChainTo ¶
func MonadChainTo[GA ~func() A, GB ~func() B, A, B any](fa GA, fb GB) GB
MonadChainTo composes computations in sequence, ignoring the return value of the first computation
func MonadMapTo ¶
func MonadMapTo[GA ~func() A, GB ~func() B, A, B any](fa GA, b B) GB
func MonadTraverseArray ¶
func MonadTraverseArray[GB ~func() B, GBS ~func() BBS, AAS ~[]A, BBS ~[]B, A, B any](tas AAS, f func(A) GB) GBS
func MonadTraverseRecord ¶
func MonadTraverseRecord[GB ~func() B, GBS ~func() MB, MA ~map[K]A, MB ~map[K]B, K comparable, A, B any](ma MA, f func(A) GB) GBS
MonadTraverseRecord transforms a record using an IO transform an IO of a record
func Retrying ¶
func Retrying[GA ~func() A, A any]( policy R.RetryPolicy, action func(R.RetryStatus) GA, check func(A) bool, ) GA
Retry combinator for actions that don't raise exceptions, but signal in their type the outcome has failed. Examples are the `Option`, `Either` and `EitherT` monads.
policy - refers to the retry policy action - converts a status into an operation to be executed check - checks if the result of the action needs to be retried
func SequenceArray ¶
func SequenceArray[GA ~func() A, GAS ~func() AAS, AAS ~[]A, GAAS ~[]GA, A any](tas GAAS) GAS
func SequenceRecord ¶
func SequenceRecord[GA ~func() A, GAS ~func() AAS, AAS ~map[K]A, GAAS ~map[K]GA, K comparable, A any](tas GAAS) GAS
func SequenceT1 ¶
func SequenceT2 ¶
func SequenceT3 ¶
func SequenceT4 ¶
func TraverseArray ¶
func TraverseArray[GB ~func() B, GBS ~func() BBS, AAS ~[]A, BBS ~[]B, A, B any](f func(A) GB) func(AAS) GBS
func TraverseRecord ¶
func TraverseRecord[GB ~func() B, GBS ~func() MB, MA ~map[K]A, MB ~map[K]B, K comparable, A, B any](f func(A) GB) func(MA) GBS
TraverseRecord transforms a record using an IO transform an IO of a record
Types ¶
This section is empty.