StateT
Model
Utilities
StateM(deprecated)StateM1(deprecated)StateM2(deprecated)StateM2C(deprecated)StateM3(deprecated)StateM3C(deprecated)- ap
- chain
- evaluate
- execute
- fromF
- fromState
getStateM(deprecated)- map
- of
Model
StateT
Signature
export interface StateT<M, S, A> {
(s: S): HKT<M, [A, S]>
}
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateT1
Signature
export interface StateT1<M extends URIS, S, A> {
(s: S): Kind<M, [A, S]>
}
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateT2
Signature
export interface StateT2<M extends URIS2, S, E, A> {
(s: S): Kind2<M, E, [A, S]>
}
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateT3
Signature
export interface StateT3<M extends URIS3, S, R, E, A> {
(s: S): Kind3<M, R, E, [A, S]>
}
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
Utilities
StateM
StateM
Signature
export interface StateM<M> {
readonly ap: <S, A, B>(fab: StateT<M, S, (a: A) => B>, fa: StateT<M, S, A>) => StateT<M, S, B>
readonly chain: <S, A, B>(fa: StateT<M, S, A>, f: (a: A) => StateT<M, S, B>) => StateT<M, S, B>
readonly evalState: <S, A>(ma: StateT<M, S, A>, s: S) => HKT<M, A>
readonly execState: <S, A>(ma: StateT<M, S, A>, s: S) => HKT<M, S>
readonly fromM: <S, A>(ma: HKT<M, A>) => StateT<M, S, A>
readonly fromState: <S, A>(fa: State<S, A>) => StateT<M, S, A>
readonly get: <S>() => StateT<M, S, S>
readonly gets: <S, A>(f: (s: S) => A) => StateT<M, S, A>
readonly map: <S, A, B>(fa: StateT<M, S, A>, f: (a: A) => B) => StateT<M, S, B>
readonly modify: <S>(f: (s: S) => S) => StateT<M, S, void>
readonly of: <S, A>(a: A) => StateT<M, S, A>
readonly put: <S>(s: S) => StateT<M, S, void>
}
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateM1
StateM1
Signature
export interface StateM1<M extends URIS> {
readonly ap: <S, A, B>(fab: StateT1<M, S, (a: A) => B>, fa: StateT1<M, S, A>) => StateT1<M, S, B>
readonly chain: <S, A, B>(fa: StateT1<M, S, A>, f: (a: A) => StateT1<M, S, B>) => StateT1<M, S, B>
readonly evalState: <S, A>(ma: StateT1<M, S, A>, s: S) => Kind<M, A>
readonly execState: <S, A>(ma: StateT1<M, S, A>, s: S) => Kind<M, S>
readonly fromM: <S, A>(ma: Kind<M, A>) => StateT1<M, S, A>
readonly fromState: <S, A>(fa: State<S, A>) => StateT1<M, S, A>
readonly get: <S>() => StateT1<M, S, S>
readonly gets: <S, A>(f: (s: S) => A) => StateT1<M, S, A>
readonly map: <S, A, B>(fa: StateT1<M, S, A>, f: (a: A) => B) => StateT1<M, S, B>
readonly modify: <S>(f: (s: S) => S) => StateT1<M, S, void>
readonly of: <S, A>(a: A) => StateT1<M, S, A>
readonly put: <S>(s: S) => StateT1<M, S, void>
}
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateM2
StateM2
Signature
export interface StateM2<M extends URIS2> {
readonly ap: <S, E, A, B>(fab: StateT2<M, S, E, (a: A) => B>, fa: StateT2<M, S, E, A>) => StateT2<M, S, E, B>
readonly chain: <S, E, A, B>(fa: StateT2<M, S, E, A>, f: (a: A) => StateT2<M, S, E, B>) => StateT2<M, S, E, B>
readonly evalState: <S, E, A>(ma: StateT2<M, S, E, A>, s: S) => Kind2<M, E, A>
readonly execState: <S, E, A>(ma: StateT2<M, S, E, A>, s: S) => Kind2<M, E, S>
readonly fromM: <S, E, A>(ma: Kind2<M, E, A>) => StateT2<M, S, E, A>
readonly fromState: <S, E, A>(fa: State<S, A>) => StateT2<M, S, E, A>
readonly get: <E, S>() => StateT2<M, S, E, S>
readonly gets: <S, E, A>(f: (s: S) => A) => StateT2<M, S, E, A>
readonly map: <S, E, A, B>(fa: StateT2<M, S, E, A>, f: (a: A) => B) => StateT2<M, S, E, B>
readonly modify: <E, S>(f: (s: S) => S) => StateT2<M, S, E, void>
readonly of: <S, E, A>(a: A) => StateT2<M, S, E, A>
readonly put: <E, S>(s: S) => StateT2<M, S, E, void>
}
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateM2C
StateM2C
Signature
export interface StateM2C<M extends URIS2, E> {
readonly ap: <S, A, B>(fab: StateT2<M, S, E, (a: A) => B>, fa: StateT2<M, S, E, A>) => StateT2<M, S, E, B>
readonly chain: <S, A, B>(fa: StateT2<M, S, E, A>, f: (a: A) => StateT2<M, S, E, B>) => StateT2<M, S, E, B>
readonly evalState: <S, A>(ma: StateT2<M, S, E, A>, s: S) => Kind2<M, E, A>
readonly execState: <S, A>(ma: StateT2<M, S, E, A>, s: S) => Kind2<M, E, S>
readonly fromM: <S, A>(ma: Kind2<M, E, A>) => StateT2<M, S, E, A>
readonly fromState: <S, A>(fa: State<S, A>) => StateT2<M, S, E, A>
readonly get: <S>() => StateT2<M, S, E, S>
readonly gets: <S, A>(f: (s: S) => A) => StateT2<M, S, E, A>
readonly map: <S, A, B>(fa: StateT2<M, S, E, A>, f: (a: A) => B) => StateT2<M, S, E, B>
readonly modify: <S>(f: (s: S) => S) => StateT2<M, S, E, void>
readonly of: <S, A>(a: A) => StateT2<M, S, E, A>
readonly put: <S>(s: S) => StateT2<M, S, E, void>
}
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateM3
StateM3
Signature
export interface StateM3<M extends URIS3> {
readonly ap: <S, R, E, A, B>(
fab: StateT3<M, S, R, E, (a: A) => B>,
fa: StateT3<M, S, R, E, A>,
) => StateT3<M, S, R, E, B>
readonly chain: <S, R, E, A, B>(
fa: StateT3<M, S, R, E, A>,
f: (a: A) => StateT3<M, S, R, E, B>,
) => StateT3<M, S, R, E, B>
readonly evalState: <S, R, E, A>(ma: StateT3<M, S, R, E, A>, s: S) => Kind3<M, R, E, A>
readonly execState: <S, R, E, A>(ma: StateT3<M, S, R, E, A>, s: S) => Kind3<M, R, E, S>
readonly fromM: <S, R, E, A>(ma: Kind3<M, R, E, A>) => StateT3<M, S, R, E, A>
readonly fromState: <S, R, E, A>(fa: State<S, A>) => StateT3<M, S, R, E, A>
readonly get: <R, E, S>() => StateT3<M, S, R, E, S>
readonly gets: <S, R, E, A>(f: (s: S) => A) => StateT3<M, S, R, E, A>
readonly map: <S, R, E, A, B>(fa: StateT3<M, S, R, E, A>, f: (a: A) => B) => StateT3<M, S, R, E, B>
readonly modify: <R, E, S>(f: (s: S) => S) => StateT3<M, S, R, E, void>
readonly of: <S, R, E, A>(a: A) => StateT3<M, S, R, E, A>
readonly put: <R, E, S>(s: S) => StateT3<M, S, R, E, void>
}
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
StateM3C
StateM3C
Signature
export interface StateM3C<M extends URIS3, E> {
readonly ap: <S, R, A, B>(fab: StateT3<M, S, R, E, (a: A) => B>, fa: StateT3<M, S, R, E, A>) => StateT3<M, S, R, E, B>
readonly chain: <S, R, A, B>(
fa: StateT3<M, S, R, E, A>,
f: (a: A) => StateT3<M, S, R, E, B>,
) => StateT3<M, S, R, E, B>
readonly evalState: <S, R, A>(ma: StateT3<M, S, R, E, A>, s: S) => Kind3<M, R, E, A>
readonly execState: <S, R, A>(ma: StateT3<M, S, R, E, A>, s: S) => Kind3<M, R, E, S>
readonly fromM: <S, R, A>(ma: Kind3<M, R, E, A>) => StateT3<M, S, R, E, A>
readonly fromState: <S, R, A>(fa: State<S, A>) => StateT3<M, S, R, E, A>
readonly get: <R, S>() => StateT3<M, S, R, E, S>
readonly gets: <S, R, A>(f: (s: S) => A) => StateT3<M, S, R, E, A>
readonly map: <S, R, A, B>(fa: StateT3<M, S, R, E, A>, f: (a: A) => B) => StateT3<M, S, R, E, B>
readonly modify: <R, S>(f: (s: S) => S) => StateT3<M, S, R, E, void>
readonly of: <S, R, A>(a: A) => StateT3<M, S, R, E, A>
readonly put: <R, S>(s: S) => StateT3<M, S, R, E, void>
}
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
ap
Signature
export declare function ap<M extends URIS3>(
M: Chain3<M>,
): <S, R, E, A>(fa: StateT3<M, S, R, E, A>) => <B>(fab: StateT3<M, S, R, E, (a: A) => B>) => StateT3<M, S, R, E, B>
export declare function ap<M extends URIS3, E>(
M: Chain3C<M, E>,
): <S, R, A>(fa: StateT3<M, S, R, E, A>) => <B>(fab: StateT3<M, S, R, E, (a: A) => B>) => StateT3<M, S, R, E, B>
export declare function ap<M extends URIS2>(
M: Chain2<M>,
): <S, E, A>(fa: StateT2<M, S, E, A>) => <B>(fab: StateT2<M, S, E, (a: A) => B>) => StateT2<M, S, E, B>
export declare function ap<M extends URIS2, E>(
M: Chain2C<M, E>,
): <S, A>(fa: StateT2<M, S, E, A>) => <B>(fab: StateT2<M, S, E, (a: A) => B>) => StateT2<M, S, E, B>
export declare function ap<M extends URIS>(
M: Chain1<M>,
): <S, A>(fa: StateT1<M, S, A>) => <B>(fab: StateT1<M, S, (a: A) => B>) => StateT1<M, S, B>
export declare function ap<M>(
M: Chain<M>,
): <S, A>(fa: StateT<M, S, A>) => <B>(fab: StateT<M, S, (a: A) => B>) => StateT<M, S, B>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
chain
Signature
export declare function chain<M extends URIS3>(
M: Chain3<M>,
): <A, S, R, E, B>(f: (a: A) => StateT3<M, S, R, E, B>) => (ma: StateT3<M, S, R, E, A>) => StateT3<M, S, R, E, B>
export declare function chain<M extends URIS3, E>(
M: Chain3C<M, E>,
): <A, S, R, B>(f: (a: A) => StateT3<M, S, R, E, B>) => (ma: StateT3<M, S, R, E, A>) => StateT3<M, S, R, E, B>
export declare function chain<M extends URIS2>(
M: Chain2<M>,
): <A, S, E, B>(f: (a: A) => StateT2<M, S, E, B>) => (ma: StateT2<M, S, E, A>) => StateT2<M, S, E, B>
export declare function chain<M extends URIS2, E>(
M: Chain2C<M, E>,
): <A, S, B>(f: (a: A) => StateT2<M, S, E, B>) => (ma: StateT2<M, S, E, A>) => StateT2<M, S, E, B>
export declare function chain<M extends URIS>(
M: Chain1<M>,
): <A, S, B>(f: (a: A) => StateT1<M, S, B>) => (ma: StateT1<M, S, A>) => StateT1<M, S, B>
export declare function chain<M>(
M: Chain<M>,
): <A, S, B>(f: (a: A) => StateT<M, S, B>) => (ma: StateT<M, S, A>) => StateT<M, S, B>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
evaluate
Signature
export declare function evaluate<F extends URIS3>(
F: Functor3<F>,
): <S>(s: S) => <R, E, A>(ma: StateT3<F, S, R, E, A>) => Kind3<F, R, E, A>
export declare function evaluate<F extends URIS3, E>(
F: Functor3C<F, E>,
): <S>(s: S) => <R, A>(ma: StateT3<F, S, R, E, A>) => Kind3<F, R, E, A>
export declare function evaluate<F extends URIS2>(
F: Functor2<F>,
): <S>(s: S) => <E, A>(ma: StateT2<F, S, E, A>) => Kind2<F, E, A>
export declare function evaluate<F extends URIS2, E>(
F: Functor2C<F, E>,
): <S>(s: S) => <A>(ma: StateT2<F, S, E, A>) => Kind2<F, E, A>
export declare function evaluate<F extends URIS>(F: Functor1<F>): <S>(s: S) => <A>(ma: StateT1<F, S, A>) => Kind<F, A>
export declare function evaluate<F>(F: Functor<F>): <S>(s: S) => <A>(ma: StateT<F, S, A>) => HKT<F, A>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
execute
Signature
export declare function execute<F extends URIS3>(
F: Functor3<F>,
): <S>(s: S) => <R, E, A>(ma: StateT3<F, S, R, E, A>) => Kind3<F, R, E, S>
export declare function execute<F extends URIS3, E>(
F: Functor3C<F, E>,
): <S>(s: S) => <R, A>(ma: StateT3<F, S, R, E, A>) => Kind3<F, R, E, S>
export declare function execute<F extends URIS2>(
F: Functor2<F>,
): <S>(s: S) => <E, A>(ma: StateT2<F, S, E, A>) => Kind2<F, E, S>
export declare function execute<F extends URIS2, E>(
F: Functor2C<F, E>,
): <S>(s: S) => <A>(ma: StateT2<F, S, E, A>) => Kind2<F, E, S>
export declare function execute<F extends URIS>(F: Functor1<F>): <S>(s: S) => <A>(ma: StateT1<F, S, A>) => Kind<F, S>
export declare function execute<F>(F: Functor<F>): <S>(s: S) => <A>(ma: StateT<F, S, A>) => HKT<F, S>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
fromF
Signature
export declare function fromF<F extends URIS3>(
F: Functor3<F>,
): <R, E, A, S>(ma: Kind3<F, R, E, A>) => StateT3<F, S, R, E, A>
export declare function fromF<F extends URIS3, E>(
F: Functor3C<F, E>,
): <R, A, S>(ma: Kind3<F, R, E, A>) => StateT3<F, S, R, E, A>
export declare function fromF<F extends URIS2>(F: Functor2<F>): <E, A, S>(ma: Kind2<F, E, A>) => StateT2<F, S, E, A>
export declare function fromF<F extends URIS2, E>(F: Functor2C<F, E>): <A, S>(ma: Kind2<F, E, A>) => StateT2<F, S, E, A>
export declare function fromF<F extends URIS>(F: Functor1<F>): <A, S>(ma: Kind<F, A>) => StateT1<F, S, A>
export declare function fromF<F>(F: Functor<F>): <A, S>(ma: HKT<F, A>) => StateT<F, S, A>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
fromState
Signature
export declare function fromState<F extends URIS3>(
F: Pointed3<F>,
): <S, A, R, E>(sa: State<S, A>) => StateT3<F, S, R, E, A>
export declare function fromState<F extends URIS3, E>(
F: Pointed3C<F, E>,
): <S, A, R>(sa: State<S, A>) => StateT3<F, S, R, E, A>
export declare function fromState<F extends URIS2>(F: Pointed2<F>): <S, A, E>(sa: State<S, A>) => StateT2<F, S, E, A>
export declare function fromState<F extends URIS2, E>(
F: Pointed2C<F, E>,
): <S, A>(sa: State<S, A>) => StateT2<F, S, E, A>
export declare function fromState<F extends URIS>(F: Pointed1<F>): <S, A>(sa: State<S, A>) => StateT1<F, S, A>
export declare function fromState<F>(F: Pointed<F>): <S, A>(sa: State<S, A>) => StateT<F, S, A>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
getStateM
getStateM
Signature
export declare function getStateM<M extends URIS3>(M: Monad3<M>): StateM3<M>
export declare function getStateM<M extends URIS3, E>(M: Monad3C<M, E>): StateM3C<M, E>
export declare function getStateM<M extends URIS2>(M: Monad2<M>): StateM2<M>
export declare function getStateM<M extends URIS2, E>(M: Monad2C<M, E>): StateM2C<M, E>
export declare function getStateM<M extends URIS>(M: Monad1<M>): StateM1<M>
export declare function getStateM<M>(M: Monad<M>): StateM<M>
Details
- Added in 0.1.0
- Deprecated
License
- MIT – Copyright (c) 2017-present Giulio Canti
map
Signature
export declare function map<F extends URIS3>(
F: Functor3<F>,
): <A, B>(f: (a: A) => B) => <S, R, E>(fa: StateT3<F, S, R, E, A>) => StateT3<F, S, R, E, B>
export declare function map<F extends URIS3, E>(
F: Functor3C<F, E>,
): <A, B>(f: (a: A) => B) => <S, R>(fa: StateT3<F, S, R, E, A>) => StateT3<F, S, R, E, B>
export declare function map<F extends URIS2>(
F: Functor2<F>,
): <A, B>(f: (a: A) => B) => <S, E>(fa: StateT2<F, S, E, A>) => StateT2<F, S, E, B>
export declare function map<F extends URIS2, E>(
F: Functor2C<F, E>,
): <A, B>(f: (a: A) => B) => <S>(fa: StateT2<F, S, E, A>) => StateT2<F, S, E, B>
export declare function map<F extends URIS>(
F: Functor1<F>,
): <A, B>(f: (a: A) => B) => <S>(fa: StateT1<F, S, A>) => StateT1<F, S, B>
export declare function map<F>(F: Functor<F>): <A, B>(f: (a: A) => B) => <S>(fa: StateT<F, S, A>) => StateT<F, S, B>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti
of
Signature
export declare function of<F extends URIS3>(F: Pointed3<F>): <A, S, R, E>(a: A) => StateT3<F, S, R, E, A>
export declare function of<F extends URIS3, E>(F: Pointed3C<F, E>): <A, S, R>(a: A) => StateT3<F, S, R, E, A>
export declare function of<F extends URIS2>(F: Pointed2<F>): <A, S, E>(a: A) => StateT2<F, S, E, A>
export declare function of<F extends URIS2, E>(F: Pointed2C<F, E>): <A, S>(a: A) => StateT2<F, S, E, A>
export declare function of<F extends URIS>(F: Pointed1<F>): <A, S>(a: A) => StateT1<F, S, A>
export declare function of<F>(F: Pointed<F>): <A, S>(a: A) => StateT<F, S, A>
Details
- Added in 0.1.0
License
- MIT – Copyright (c) 2017-present Giulio Canti