Documentation
¶
Index ¶
- func After[GA ~func() A, A any](timestamp time.Time) func(GA) GA
- func Ap[GB ~func() B, GAB ~func() func(A) B, GA ~func() A, B, A 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) GAdeprecated
- func ApFirstPar[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](second GB) func(GA) GAdeprecated
- func ApFirstSeq[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](second GB) func(GA) GAdeprecated
- func ApPar[GB ~func() B, GAB ~func() func(A) B, GA ~func() A, B, A any](ma GA) func(GAB) GB
- func ApSecond[GA ~func() A, GB ~func() B, GBB ~func() func(B) B, A, B any](second GB) func(GA) GBdeprecated
- func ApSeq[GB ~func() B, GAB ~func() func(A) B, GA ~func() A, B, A any](ma GA) func(GAB) GB
- 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 Flap[FAB ~func(A) B, GFAB ~func() FAB, GB ~func() B, A, B any](a A) func(GFAB) GB
- 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 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) GBdeprecated
- func MonadApFirst[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GAdeprecated
- func MonadApFirstPar[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GAdeprecated
- func MonadApFirstSeq[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GAdeprecated
- func MonadApPar[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GBdeprecated
- func MonadApSecond[GA ~func() A, GB ~func() B, GBB ~func() func(B) B, A, B any](first GA, second GB) GBdeprecated
- func MonadApSeq[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GBdeprecated
- 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 MonadFlap[FAB ~func(A) B, GFAB ~func() FAB, GB ~func() B, A, B any](fab GFAB, a A) 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 Now[GA ~func() time.Time]() GA
- func Of[GA ~func() A, A any](a A) GA
- func WithDuration[GTA ~func() P.Pair[time.Duration, A], GA ~func() A, A any](a GA) GTA
- func WithTime[GTA ~func() T.Tuple3[A, time.Time, time.Time], GA ~func() A, A any](a GA) GTA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApFirstPar
deprecated
func ApFirstPar[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](second GB) func(GA) GA
ApFirstPar combines two effectful actions, keeping only the result of the first.
Deprecated:
func ApFirstSeq
deprecated
func ApFirstSeq[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](second GB) func(GA) GA
ApFirstSeq combines two effectful actions, keeping only the result of the first.
Deprecated:
func ApPar ¶
func ApPar[GB ~func() B, GAB ~func() func(A) B, GA ~func() A, B, A any](ma GA) func(GAB) GB
func ApSeq ¶
func ApSeq[GB ~func() B, GAB ~func() func(A) B, GA ~func() A, B, A any](ma GA) func(GAB) GB
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 MonadApFirst
deprecated
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.
Deprecated:
func MonadApFirstPar
deprecated
func MonadApFirstPar[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GA
MonadApFirstPar combines two effectful actions, keeping only the result of the first.
Deprecated:
func MonadApFirstSeq
deprecated
func MonadApFirstSeq[GA ~func() A, GB ~func() B, GBA ~func() func(B) A, A, B any](first GA, second GB) GA
MonadApFirstSeq combines two effectful actions, keeping only the result of the first.
Deprecated:
func MonadApPar
deprecated
func MonadApPar[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GB
MonadApPar implements the applicative on two threads, the main thread executes mab and the actuall apply operation and the second thread computes ma. Communication between the threads happens via a channel
Deprecated:
func MonadApSecond
deprecated
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.
Deprecated:
func MonadApSeq
deprecated
func MonadApSeq[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GB
Deprecated: MonadApSeq implements the applicative on a single thread by first executing mab and the ma
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 MonadFlap ¶
func MonadFlap[FAB ~func(A) B, GFAB ~func() FAB, GB ~func() B, A, B any](fab GFAB, a A) GB
func MonadMapTo ¶
func MonadMapTo[GA ~func() A, GB ~func() B, A, B any](fa GA, b B) GB
func WithDuration ¶
WithDuration returns an operation that measures the duration of the operation
Types ¶
This section is empty.