ReaderIO overview
Added in v0.1.0
Table of contents
Applicative
of
Signature
export declare const of: <E, A>(a: A) => ReaderIO<E, A>
Added in v0.1.18
Apply
ap
Signature
export declare const ap: <E, A>(fa: ReaderIO<E, A>) => <B>(fab: ReaderIO<E, (a: A) => B>) => ReaderIO<E, B>
Added in v0.1.18
apFirst
Signature
export declare const apFirst: <E, B>(fb: ReaderIO<E, B>) => <A>(fa: ReaderIO<E, A>) => ReaderIO<E, A>
Added in v0.1.18
apSecond
Signature
export declare const apSecond: <E, B>(fb: ReaderIO<E, B>) => <A>(fa: ReaderIO<E, A>) => ReaderIO<E, B>
Added in v0.1.18
apW
Less strict version of ap
.
Signature
export declare const apW: <R2, A>(
fa: ReaderIO<R2, A>
) => <R1, B>(fab: ReaderIO<R1, (a: A) => B>) => ReaderIO<R1 & R2, B>
Added in v0.1.28
Functor
map
Signature
export declare const map: <A, B>(f: (a: A) => B) => <E>(fa: ReaderIO<E, A>) => ReaderIO<E, B>
Added in v0.1.18
Monad
chain
Signature
export declare const chain: <E, A, B>(f: (a: A) => ReaderIO<E, B>) => (ma: ReaderIO<E, A>) => ReaderIO<E, B>
Added in v0.1.18
chainFirst
Signature
export declare const chainFirst: <E, A, B>(f: (a: A) => ReaderIO<E, B>) => (ma: ReaderIO<E, A>) => ReaderIO<E, A>
Added in v0.1.18
chainIOK
Signature
export declare const chainIOK: <A, B>(f: (a: A) => I.IO<B>) => <R>(ma: ReaderIO<R, A>) => ReaderIO<R, B>
Added in v0.1.10
chainW
Less strict version of chain
.
Signature
export declare const chainW: <R2, A, B>(
f: (a: A) => ReaderIO<R2, B>
) => <R1>(ma: ReaderIO<R1, A>) => ReaderIO<R1 & R2, B>
Added in v0.1.28
flatten
Signature
export declare const flatten: <E, A>(mma: ReaderIO<E, ReaderIO<E, A>>) => ReaderIO<E, A>
Added in v0.1.18
flattenW
Less strict version of flatten
.
Signature
export declare const flattenW: <R1, R2, A>(mma: ReaderIO<R1, ReaderIO<R2, A>>) => ReaderIO<R1 & R2, A>
Added in v0.1.28
combinators
asksReaderIO
Effectfully accesses the environment.
Signature
export declare const asksReaderIO: <R, A>(f: (r: R) => ReaderIO<R, A>) => ReaderIO<R, A>
Added in v0.1.27
asksReaderIOW
Less strict version of asksReaderIO
.
Signature
export declare const asksReaderIOW: <R1, R2, A>(f: (r1: R1) => ReaderIO<R2, A>) => ReaderIO<R1 & R2, A>
Added in v0.1.27
chainFirstW
Less strict version of chainFirst
.
Derivable from Chain
.
Signature
export declare const chainFirstW: <R2, A, B>(
f: (a: A) => ReaderIO<R2, B>
) => <R1>(ma: ReaderIO<R1, A>) => ReaderIO<R1 & R2, A>
Added in v0.1.28
local
Signature
export declare const local: <Q, R>(f: (f: Q) => R) => <A>(ma: ReaderIO<R, A>) => ReaderIO<Q, A>
Added in v0.1.0
constructors
ask
Signature
export declare const ask: <R>() => ReaderIO<R, R>
Added in v0.1.0
asks
Signature
export declare const asks: <R, A>(f: (r: R) => A) => ReaderIO<R, A>
Added in v0.1.0
fromIO
Signature
export declare const fromIO: <R, A>(ma: I.IO<A>) => ReaderIO<R, 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) => ReaderIO<R, B>
Added in v0.1.10
fromReader
Signature
export declare const fromReader: <R, A>(ma: Reader<R, A>) => ReaderIO<R, A>
Added in v0.1.0
instances
Applicative
Signature
export declare const Applicative: Applicative2<'ReaderIO'>
Added in v0.1.18
Apply
Signature
export declare const Apply: Apply2<'ReaderIO'>
Added in v0.1.18
Functor
Signature
export declare const Functor: Functor2<'ReaderIO'>
Added in v0.1.18
Monad
Signature
export declare const Monad: Monad2<'ReaderIO'>
Added in v0.1.18
URI
Signature
export declare const URI: 'ReaderIO'
Added in v0.1.0
URI (type alias)
Signature
export type URI = typeof URI
Added in v0.1.0
readerIO
Signature
export declare const readerIO: Monad2<'ReaderIO'>
Added in v0.1.0
model
ReaderIO (interface)
Signature
export interface ReaderIO<R, A> {
(r: R): IO<A>
}
Added in v0.1.0
utils
run
Signature
export declare const run: <R, A>(ma: ReaderIO<R, A>, r: R) => A
Added in v0.1.0