StateReaderTaskEither overview

Added in v2.0.0


Table of contents


StateReaderTaskEither (interface)

Signature

export interface StateReaderTaskEither<S, R, E, A> {
  (s: S): ReaderTaskEither<R, E, [A, S]>
}

Added in v2.0.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0

URI

Signature

export const URI: "StateReaderTaskEither" = ...

Added in v2.0.0

ap

Signature

<S, R, E, A>(fa: StateReaderTaskEither<S, R, E, A>) => <B>(fab: StateReaderTaskEither<S, R, E, (a: A) => B>) => StateReaderTaskEither<S, R, E, B>

Added in v2.0.0

apFirst

Signature

<S, R, E, B>(fb: StateReaderTaskEither<S, R, E, B>) => <A>(fa: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, A>

Added in v2.0.0

apSecond

Signature

<S, R, E, B>(fb: StateReaderTaskEither<S, R, E, B>) => <A>(fa: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B>

Added in v2.0.0

chain

Signature

<S, R, E, A, B>(f: (a: A) => StateReaderTaskEither<S, R, E, B>) => (ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B>

Added in v2.0.0

chainEitherK

Signature

export function chainEitherK<E, A, B>(
  f: (a: A) => Either<E, B>
): <S, R>(ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

chainFirst

Signature

<S, R, E, A, B>(f: (a: A) => StateReaderTaskEither<S, R, E, B>) => (ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, A>

Added in v2.0.0

chainIOEitherK

Signature

export function chainIOEitherK<E, A, B>(
  f: (a: A) => IOEither<E, B>
): <S, R>(ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

chainReaderTaskEitherK

Signature

export function chainReaderTaskEitherK<R, E, A, B>(
  f: (a: A) => ReaderTaskEither<R, E, B>
): <S>(ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

chainTaskEitherK

Signature

export function chainTaskEitherK<E, A, B>(
  f: (a: A) => TaskEither<E, B>
): <S, R>(ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

evalState

Run a computation in the StateReaderTaskEither monad, discarding the final state

Signature

export const : <S, R, E, A>(ma: StateReaderTaskEither<S, R, E, A>, s: S) => RTE.ReaderTaskEither<R, E, A> = ...

Added in v2.0.0

execState

Run a computation in the StateReaderTaskEither monad discarding the result

Signature

export const : <S, R, E, A>(ma: StateReaderTaskEither<S, R, E, A>, s: S) => RTE.ReaderTaskEither<R, E, S> = ...

Added in v2.0.0

filterOrElse

Signature

{ <E, A, B>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <S, R>(ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <S, R>(ma: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, A>; }

Added in v2.4.4

flatten

Signature

<S, R, E, A>(mma: StateReaderTaskEither<S, R, E, StateReaderTaskEither<S, R, E, A>>) => StateReaderTaskEither<S, R, E, A>

Added in v2.0.0

fromEither

Signature

<S, R, E, A>(ma: Either<E, A>) => StateReaderTaskEither<S, R, E, A>

Added in v2.0.0

fromEitherK

Signature

export function fromEitherK<E, A extends ReadonlyArray<unknown>, B>(
  f: (...a: A) => Either<E, B>
): <S, R>(...a: A) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

fromIOEither

Signature

export function fromIOEither<S, R, E, A>(ma: IOEither<E, A>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

fromIOEitherK

Signature

export function fromIOEitherK<E, A extends ReadonlyArray<unknown>, B>(
  f: (...a: A) => IOEither<E, B>
): <S, R>(...a: A) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

fromOption

Signature

<E>(onNone: () => E) => <S, R, A>(ma: Option<A>) => StateReaderTaskEither<S, R, E, A>

Added in v2.0.0

fromPredicate

Signature

{ <E, A, B>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <S, R>(a: A) => StateReaderTaskEither<S, R, E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <S, R>(a: A) => StateReaderTaskEither<S, R, E, A>; }

Added in v2.4.4

fromReaderEither

Signature

export function fromReaderEither<S, R, E, A>(ma: ReaderEither<R, E, A>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

fromReaderTaskEither

Signature

export const : <S, R, E, A>(ma: RTE.ReaderTaskEither<R, E, A>) => StateReaderTaskEither<S, R, E, A> = ...

Added in v2.0.0

fromReaderTaskEitherK

Signature

export function fromReaderTaskEitherK<R, E, A extends ReadonlyArray<unknown>, B>(
  f: (...a: A) => ReaderTaskEither<R, E, B>
): <S>(...a: A) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

fromTaskEither

Signature

export function fromTaskEither<S, R, E, A>(ma: TaskEither<E, A>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

fromTaskEitherK

Signature

export function fromTaskEitherK<E, A extends ReadonlyArray<unknown>, B>(
  f: (...a: A) => TaskEither<E, B>
): <S, R>(...a: A) => StateReaderTaskEither<S, R, E, B> { ... }

Added in v2.4.0

get

Get the current state

Signature

export const get: <S, R, E = never>() => StateReaderTaskEither<S, R, E, S> = ...

Added in v2.0.0

gets

Get a value which depends on the current state

Signature

export const gets: <S, R, E = never, A = never>(f: (s: S) => A) => StateReaderTaskEither<S, R, E, A> = ...

Added in v2.0.0

left

Signature

export function left<S, R, E = never, A = never>(e: E): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

leftIO

Signature

export function leftIO<S, R, E = never, A = never>(me: IO<E>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

leftReader

Signature

export function leftReader<S, R, E = never, A = never>(me: Reader<R, E>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

leftState

Signature

export function leftState<S, R, E = never, A = never>(me: State<S, E>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

leftTask

Signature

export function leftTask<S, R, E = never, A = never>(me: Task<E>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

map

Signature

<A, B>(f: (a: A) => B) => <S, R, E>(fa: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B>

Added in v2.0.0

modify

Modify the state by applying a function to the current state

Signature

export const modify: <S, R, E = never>(f: (s: S) => S) => StateReaderTaskEither<S, R, E, void> = ...

Added in v2.0.0

put

Set the state

Signature

export const put: <S, R, E = never>(s: S) => StateReaderTaskEither<S, R, E, void> = ...

Added in v2.0.0

right

Signature

export const right: <S, R, E = never, A = never>(a: A) => StateReaderTaskEither<S, R, E, A> = ...

Added in v2.0.0

rightIO

Signature

export function rightIO<S, R, E = never, A = never>(ma: IO<A>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

rightReader

Signature

export function rightReader<S, R, E = never, A = never>(ma: Reader<R, A>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

rightState

Signature

export const : <S, R, E = never, A = never>(ma: State<S, A>) => StateReaderTaskEither<S, R, E, A> = ...

Added in v2.0.0

rightTask

Signature

export function rightTask<S, R, E = never, A = never>(ma: Task<A>): StateReaderTaskEither<S, R, E, A> { ... }

Added in v2.0.0

run

Signature

export function run<S, R, E, A>(ma: StateReaderTaskEither<S, R, E, A>, s: S, r: R): Promise<Either<E, [A, S]>> { ... }

Added in v2.0.0

stateReaderTaskEither

Signature

export const stateReaderTaskEither: Monad4<URI> & Bifunctor4<URI> & Alt4<URI> & MonadTask4<URI> & MonadThrow4<URI> = ...

Added in v2.0.0

stateReaderTaskEitherSeq

Like stateReaderTaskEither but ap is sequential

Signature

export const stateReaderTaskEitherSeq: typeof stateReaderTaskEither = ...

Added in v2.0.0