Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 1.1 KB

StateT.md

File metadata and controls

79 lines (52 loc) · 1.1 KB

MODULE StateT

ap

function

ap<F>(
  F: Chain<F>
): <S, A, B>(fab: (s: S) => HKT<F, [(a: A) => B, S]>, fa: (s: S) => HKT<F, [A, S]>) => (s: S) => HKT<F, [B, S]>

chain

function

chain<F>(
  F: Chain<F>
): <S, A, B>(f: (a: A) => (s: S) => HKT<F, [B, S]>, fa: (s: S) => HKT<F, [A, S]>) => (s: S) => HKT<F, [B, S]>

get

function

get<F>(F: Applicative<F>): <S>() => (s: S) => HKT<F, [S, S]>

getStateT

function

getStateT<M>(M: Monad<M>): StateT<M>

gets

function

gets<F>(F: Applicative<F>): <S, A>(f: (s: S) => A) => (s: S) => HKT<F, [A, S]>

map

function

map<F>(
  F: Functor<F>
): <S, A, B>(f: (a: A) => B, fa: (s: S) => HKT<F, [A, S]>) => (s: S) => HKT<F, [B, S]>

modify

function

modify<F>(F: Applicative<F>): <S>(f: Endomorphism<S>) => (s: S) => HKT<F, [void, S]>

of

function

of<F>(F: Applicative<F>): <S, A>(a: A) => (s: S) => HKT<F, [A, S]>

put

function

put<F>(F: Applicative<F>): <S>(s: S) => () => HKT<F, [void, S]>