ReaderTask overview

Added in v2.3.0


Table of contents


ReaderTask (interface)

Signature

export interface ReaderTask<R, A> {
  (r: R): Task<A>
}

Added in v2.3.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.3.0

URI (constant)

Signature

export const URI: "ReaderTask" = ...

Added in v2.3.0

ask (constant)

Signature

export const ask: <R>() => ReaderTask<R, R> = ...

Added in v2.3.0

asks (constant)

Signature

export const asks: <R, A = ...

Added in v2.3.0

fromReader (constant)

Signature

export const fromReader: <R, A = ...

Added in v2.3.0

fromTask (constant)

Signature

export const fromTask: <R, A>(ma: Task<A>) => ReaderTask<R, A> = ...

Added in v2.3.0

of (constant)

Signature

export const of: <R, A>(a: A) => ReaderTask<R, A> = ...

Added in v2.3.0

readerTask (constant)

Signature

export const readerTask: Monad2<URI> & MonadTask2<URI> = ...

Added in v2.3.0

readerTaskSeq (constant)

Like readerTask but ap is sequential

Signature

export const readerTaskSeq: typeof readerTask = ...

Added in v2.3.0

chainIOK (function)

Signature

export function chainIOK<A, B>(f: (a: A) => IO<B>): <R>(ma: ReaderTask<R, A>) => ReaderTask<R, B> { ... }

Added in v2.4.0

chainTaskK (function)

Signature

export function chainTaskK<A, B>(f: (a: A) => Task<B>): <R>(ma: ReaderTask<R, A>) => ReaderTask<R, B> { ... }

Added in v2.4.0

fromIO (function)

Signature

export function fromIO<R, A>(ma: IO<A>): ReaderTask<R, A> { ... }

Added in v2.3.0

fromIOK (function)

Signature

export function fromIOK<A extends Array<unknown>, B>(f: (...a: A) => IO<B>): <R>(...a: A) => ReaderTask<R, B> { ... }

Added in v2.4.0

fromTaskK (function)

Signature

export function fromTaskK<A extends Array<unknown>, B>(f: (...a: A) => Task<B>): <R>(...a: A) => ReaderTask<R, B> { ... }

Added in v2.4.0

getMonoid (function)

Signature

export function getMonoid<R, A>(M: Monoid<A>): Monoid<ReaderTask<R, A>> { ... }

Added in v2.3.0

getSemigroup (function)

Signature

export function getSemigroup<R, A>(S: Semigroup<A>): Semigroup<ReaderTask<R, A>> { ... }

Added in v2.3.0

local (function)

Signature

export function local<Q, R>(f: (f: Q) => R): <A>(ma: ReaderTask<R, A>) => ReaderTask<Q, A> { ... }

Added in v2.3.0

run (function)

Signature

export function run<R, A>(ma: ReaderTask<R, A>, r: R): Promise<A> { ... }

Added in v2.4.0

ap (export)

Signature

<E, A>(fa: ReaderTask<E, A>) => <B>(fab: ReaderTask<E, (a: A) => B>) => ReaderTask<E, B>

Added in v2.3.0

apFirst (export)

Signature

<E, B>(fb: ReaderTask<E, B>) => <A>(fa: ReaderTask<E, A>) => ReaderTask<E, A>

Added in v2.3.0

apSecond (export)

Signature

<E, B>(fb: ReaderTask<E, B>) => <A>(fa: ReaderTask<E, A>) => ReaderTask<E, B>

Added in v2.3.0

chain (export)

Signature

<E, A, B>(f: (a: A) => ReaderTask<E, B>) => (ma: ReaderTask<E, A>) => ReaderTask<E, B>

Added in v2.3.0

chainFirst (export)

Signature

<E, A, B>(f: (a: A) => ReaderTask<E, B>) => (ma: ReaderTask<E, A>) => ReaderTask<E, A>

Added in v2.3.0

flatten (export)

Signature

<E, A>(mma: ReaderTask<E, ReaderTask<E, A>>) => ReaderTask<E, A>

Added in v2.3.0

map (export)

Signature

<A, B>(f: (a: A) => B) => <E>(fa: ReaderTask<E, A>) => ReaderTask<E, B>

Added in v2.3.0