Documentation ¶
Index ¶
- func Ap[S, A, B any](ga State[S, A]) func(State[S, func(A) B]) State[S, B]
- func Applicative[S, A, B any]() applicative.Applicative[A, B, State[S, A], State[S, B], State[S, func(A) B]]
- func Chain[S any, FCT ~func(A) State[S, B], A, B any](f FCT) func(State[S, A]) State[S, B]
- func ChainFirst[S any, FCT ~func(A) State[S, B], A, B any](f FCT) func(State[S, A]) State[S, A]
- func Eq[S, A any](w EQ.Eq[S], a EQ.Eq[A]) func(S) EQ.Eq[State[S, A]]
- func Evaluate[A, S any](s S) func(State[S, A]) A
- func Execute[A, S any](s S) func(State[S, A]) S
- func Flap[S, A, B any](a A) func(State[S, func(A) B]) State[S, B]
- func FromStrictEquals[S, A comparable]() func(S) EQ.Eq[State[S, A]]
- func Functor[S, A, B any]() functor.Functor[A, B, State[S, A], State[S, B]]
- func Map[S any, FCT ~func(A) B, A, B any](f FCT) func(State[S, A]) State[S, B]
- func Monad[S, A, B any]() monad.Monad[A, B, State[S, A], State[S, B], State[S, func(A) B]]
- func Pointed[S, A any]() pointed.Pointed[A, State[S, A]]
- type State
- func Flatten[S, A any](mma State[S, State[S, A]]) State[S, A]
- func Get[S any]() State[S, S]
- func Gets[FCT ~func(S) A, A, S any](f FCT) State[S, A]
- func Modify[FCT ~func(S) S, S any](f FCT) State[S, any]
- func MonadAp[S, A, B any](fab State[S, func(A) B], fa State[S, A]) State[S, B]
- func MonadChain[S any, FCT ~func(A) State[S, B], A, B any](fa State[S, A], f FCT) State[S, B]
- func MonadChainFirst[S any, FCT ~func(A) State[S, B], A, B any](ma State[S, A], f FCT) State[S, A]
- func MonadFlap[FAB ~func(A) B, S, A, B any](fab State[S, FAB], a A) State[S, B]
- func MonadMap[S any, FCT ~func(A) B, A, B any](fa State[S, A], f FCT) State[S, B]
- func Of[S, A any](a A) State[S, A]
- func Put[S any]() State[S, any]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Applicative ¶
func Applicative[S, A, B any]() applicative.Applicative[A, B, State[S, A], State[S, B], State[S, func(A) B]]
Applicative implements the applicative operations for State
func ChainFirst ¶
func FromStrictEquals ¶
func FromStrictEquals[S, A comparable]() func(S) EQ.Eq[State[S, A]]
FromStrictEquals constructs an [EQ.Eq] from the canonical comparison function
Types ¶
type State ¶
State represents an operation on top of a current State that produces a value and a new State
func MonadChain ¶
func MonadChainFirst ¶
Click to show internal directories.
Click to hide internal directories.