StateIO overview
Added in v0.1.0
Table of contents
Applicative
of
Signature
export declare const of: <E, A>(a: A) => StateIO<E, A>
Added in v0.1.18
Apply
ap
Signature
export declare const ap: <E, A>(fa: StateIO<E, A>) => <B>(fab: StateIO<E, (a: A) => B>) => StateIO<E, B>
Added in v0.1.18
apFirst
Signature
export declare const apFirst: <E, B>(fb: StateIO<E, B>) => <A>(fa: StateIO<E, A>) => StateIO<E, A>
Added in v0.1.18
apSecond
Signature
export declare const apSecond: <E, B>(fb: StateIO<E, B>) => <A>(fa: StateIO<E, A>) => StateIO<E, B>
Added in v0.1.18
Functor
map
Signature
export declare const map: <A, B>(f: (a: A) => B) => <E>(fa: StateIO<E, A>) => StateIO<E, B>
Added in v0.1.18
Monad
chain
Signature
export declare const chain: <E, A, B>(f: (a: A) => StateIO<E, B>) => (ma: StateIO<E, A>) => StateIO<E, B>
Added in v0.1.18
chainFirst
Signature
export declare const chainFirst: <E, A, B>(f: (a: A) => StateIO<E, B>) => (ma: StateIO<E, A>) => StateIO<E, A>
Added in v0.1.18
chainIOK
Signature
export declare const chainIOK: <A, B>(f: (a: A) => I.IO<B>) => <R>(ma: StateIO<R, A>) => StateIO<R, B>
Added in v0.1.10
flatten
Signature
export declare const flatten: <E, A>(mma: StateIO<E, StateIO<E, A>>) => StateIO<E, A>
Added in v0.1.18
constructors
fromIO
Signature
export declare const fromIO: <S, A>(ma: I.IO<A>) => StateIO<S, A>
Added in v0.1.0
fromIOK
Signature
export declare const fromIOK: <A extends unknown[], B>(f: (...a: A) => I.IO<B>) => <R>(...a: A) => StateIO<R, B>
Added in v0.1.10
fromState
Signature
export declare const fromState: <S, A>(ma: State<S, A>) => StateIO<S, A>
Added in v0.1.0
get
Signature
export declare const get: <S>() => StateIO<S, S>
Added in v0.1.0
gets
Signature
export declare const gets: <S, A>(f: (s: S) => A) => StateIO<S, A>
Added in v0.1.0
modify
Signature
export declare const modify: <S>(f: (s: S) => S) => StateIO<S, void>
Added in v0.1.0
put
Signature
export declare const put: <S>(s: S) => StateIO<S, void>
Added in v0.1.0
instances
Applicative
Signature
export declare const Applicative: Applicative2<'StateIO'>
Added in v0.1.18
Apply
Signature
export declare const Apply: Apply2<'StateIO'>
Added in v0.1.18
Functor
Signature
export declare const Functor: Functor2<'StateIO'>
Added in v0.1.18
Monad
Signature
export declare const Monad: Monad2<'StateIO'>
Added in v0.1.18
URI
Signature
export declare const URI: 'StateIO'
Added in v0.1.0
URI (type alias)
Signature
export type URI = typeof URI
Added in v0.1.0
stateIO
Signature
export declare const stateIO: Monad2<'StateIO'>
Added in v0.1.0
model
StateIO (interface)
Signature
export interface StateIO<S, A> {
(s: S): IO<[A, S]>
}
Added in v0.1.0
utils
evalState
Signature
export declare const evalState: <S, A>(ma: StateIO<S, A>, s: S) => I.IO<A>
Added in v0.1.0
execState
Signature
export declare const execState: <S, A>(ma: StateIO<S, A>, s: S) => I.IO<S>
Added in v0.1.0
run
Signature
export declare const run: <S, A>(ma: StateIO<S, A>, s: S) => A
Added in v0.1.0