Documentation
¶
Index ¶
- func Ap[GB ~func() P.Pair[B, W], GAB ~func() P.Pair[func(A) B, W], ...](s SG.Semigroup[W], ga GA) func(GAB) GB
- func ApS[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], GT ~func() P.Pair[A, W], ...](s SG.Semigroup[W], setter func(A) func(S1) S2, fa GT) func(GS1) GS2
- func Applicative[GB ~func() P.Pair[B, W], GAB ~func() P.Pair[func(A) B, W], ...](m M.Monoid[W]) applicative.Applicative[A, B, GA, GB, GAB]
- func Bind[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], GT ~func() P.Pair[A, W], ...](s SG.Semigroup[W], setter func(A) func(S1) S2, f func(S1) GT) func(GS1) GS2
- func BindTo[GS1 ~func() P.Pair[S1, W], GT ~func() P.Pair[A, W], W, S1, A any](setter func(A) S1) func(GT) GS1
- func Censor[GA ~func() P.Pair[A, W], FCT ~func(W) W, W, A any](f FCT) func(GA) GA
- func Chain[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], FCT ~func(A) GB, W, A, B any](s SG.Semigroup[W], f FCT) func(GA) GB
- func ChainFirst[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], FCT ~func(A) GB, W, A, B any](s SG.Semigroup[W], f FCT) func(GA) GA
- func Do[GS ~func() P.Pair[S, W], W, S any](m M.Monoid[W], s S) GS
- func Eq[GA ~func() P.Pair[A, W], W, A any](w EQ.Eq[W], a EQ.Eq[A]) EQ.Eq[GA]
- func Evaluate[GA ~func() P.Pair[A, W], W, A any](fa GA) A
- func Execute[GA ~func() P.Pair[A, W], W, A any](fa GA) W
- func Flap[FAB ~func(A) B, GFAB ~func() P.Pair[FAB, W], GB ~func() P.Pair[B, W], ...](a A) func(GFAB) GB
- func Flatten[GAA ~func() P.Pair[GA, W], GA ~func() P.Pair[A, W], W, A any](s SG.Semigroup[W], mma GAA) GA
- func FromStrictEquals[GA ~func() P.Pair[A, W], W, A comparable]() EQ.Eq[GA]
- func Functor[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], W, A, B any]() functor.Functor[A, B, GA, GB]
- func Let[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], W, S1, S2, A any](key func(A) func(S1) S2, f func(S1) A) func(GS1) GS2
- func LetTo[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], W, S1, S2, B any](key func(B) func(S1) S2, b B) func(GS1) GS2
- func Listen[GA ~func() P.Pair[A, W], GTA ~func() P.Pair[P.Pair[A, W], W], W, A any](fa GA) GTA
- func Listens[GA ~func() P.Pair[A, W], GAB ~func() P.Pair[P.Pair[A, B], W], FCT ~func(W) B, ...](f FCT) func(GA) GAB
- func Map[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], FCT ~func(A) B, W, A, B any](f FCT) func(GA) GB
- func Monad[GB ~func() P.Pair[B, W], GAB ~func() P.Pair[func(A) B, W], ...](m M.Monoid[W]) monad.Monad[A, B, GA, GB, GAB]
- func MonadAp[GB ~func() P.Pair[B, W], GAB ~func() P.Pair[func(A) B, W], ...](s SG.Semigroup[W], fab GAB, fa GA) GB
- func MonadCensor[GA ~func() P.Pair[A, W], FCT ~func(W) W, W, A any](fa GA, f FCT) GA
- func MonadChain[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], FCT ~func(A) GB, W, A, B any](s SG.Semigroup[W], fa GA, f FCT) GB
- func MonadChainFirst[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], FCT ~func(A) GB, W, A, B any](s SG.Semigroup[W], ma GA, f FCT) GA
- func MonadFlap[FAB ~func(A) B, GFAB ~func() P.Pair[FAB, W], GB ~func() P.Pair[B, W], ...](fab GFAB, a A) GB
- func MonadListens[GA ~func() P.Pair[A, W], GAB ~func() P.Pair[P.Pair[A, B], W], FCT ~func(W) B, ...](fa GA, f FCT) GAB
- func MonadMap[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], FCT ~func(A) B, W, A, B any](fa GA, f FCT) GB
- func Of[GA ~func() P.Pair[A, W], W, A any](m M.Monoid[W], a A) GA
- func Pass[GFA ~func() P.Pair[P.Pair[A, FCT], W], GA ~func() P.Pair[A, W], FCT ~func(W) W, ...](fa GFA) GA
- func Pointed[GA ~func() P.Pair[A, W], W, A any](m M.Monoid[W]) pointed.Pointed[A, GA]
- func Tell[GA ~func() P.Pair[any, W], W any](w W) GA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApS ¶ added in v1.0.107
func ApS[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], GT ~func() P.Pair[A, W], W, S1, S2, A any]( s SG.Semigroup[W], setter func(A) func(S1) S2, fa GT, ) func(GS1) GS2
ApS attaches a value to a context [S1] to produce a context [S2] by considering the context and the value concurrently
func Applicative ¶ added in v1.0.129
func Applicative[GB ~func() P.Pair[B, W], GAB ~func() P.Pair[func(A) B, W], GA ~func() P.Pair[A, W], W, A, B any](m M.Monoid[W]) applicative.Applicative[A, B, GA, GB, GAB]
Applicative implements the applicative operations for [Writer]
func Bind ¶ added in v1.0.107
func Bind[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], GT ~func() P.Pair[A, W], W, S1, S2, A any]( s SG.Semigroup[W], setter func(A) func(S1) S2, f func(S1) GT, ) func(GS1) GS2
Bind attaches the result of a computation to a context [S1] to produce a context [S2]
func BindTo ¶ added in v1.0.107
func BindTo[GS1 ~func() P.Pair[S1, W], GT ~func() P.Pair[A, W], W, S1, A any]( setter func(A) S1, ) func(GT) GS1
BindTo initializes a new state [S1] from a value [T]
func ChainFirst ¶
func Do ¶ added in v1.0.107
Bind creates an empty context of type [S] to be used with the Bind operation
func FromStrictEquals ¶
func FromStrictEquals[GA ~func() P.Pair[A, W], W, A comparable]() EQ.Eq[GA]
FromStrictEquals constructs an [EQ.Eq] from the canonical comparison function
func Functor ¶ added in v1.0.129
func Functor[GB ~func() P.Pair[B, W], GA ~func() P.Pair[A, W], W, A, B any]() functor.Functor[A, B, GA, GB]
Functor implements the functor operations for [Writer]
func Let ¶ added in v1.0.107
func Let[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], W, S1, S2, A any]( key func(A) func(S1) S2, f func(S1) A, ) func(GS1) GS2
Let attaches the result of a computation to a context [S1] to produce a context [S2]
func LetTo ¶ added in v1.0.107
func LetTo[GS1 ~func() P.Pair[S1, W], GS2 ~func() P.Pair[S2, W], W, S1, S2, B any]( key func(B) func(S1) S2, b B, ) func(GS1) GS2
LetTo attaches the a value to a context [S1] to produce a context [S2]
func Listen ¶ added in v1.0.107
Listen modifies the result to include the changes to the accumulator
func Listens ¶
func Listens[GA ~func() P.Pair[A, W], GAB ~func() P.Pair[P.Pair[A, B], W], FCT ~func(W) B, W, A, B any](f FCT) func(GA) GAB
Listens projects a value from modifications made to the accumulator during an action
func Monad ¶ added in v1.0.129
func Monad[GB ~func() P.Pair[B, W], GAB ~func() P.Pair[func(A) B, W], GA ~func() P.Pair[A, W], W, A, B any](m M.Monoid[W]) monad.Monad[A, B, GA, GB, GAB]
Monad implements the monadic operations for [Writer]
func MonadCensor ¶
MonadCensor modifies the final accumulator value by applying a function
func MonadChain ¶
func MonadChainFirst ¶
func MonadListens ¶
func MonadListens[GA ~func() P.Pair[A, W], GAB ~func() P.Pair[P.Pair[A, B], W], FCT ~func(W) B, W, A, B any](fa GA, f FCT) GAB
MonadListens projects a value from modifications made to the accumulator during an action
func Pass ¶ added in v1.0.107
func Pass[GFA ~func() P.Pair[P.Pair[A, FCT], W], GA ~func() P.Pair[A, W], FCT ~func(W) W, W, A any](fa GFA) GA
Pass applies the returned function to the accumulator
Types ¶
This section is empty.