Table of contents
- URI (type alias)
- Reader (class)
- URI (constant)
- reader (constant)
- ask (function)
- asks (function)
- getMonoid (function)
- getSemigroup (function)
- local (function)
URI (type alias)
Signature
export type URI = typeof URI
Reader (class)
Signature
export class Reader<E, A> {
constructor(readonly run: (e: E) => A) { ... }
...
}
Added in v1.0.0
map (method)
Signature
map<B>(f: (a: A) => B): Reader<E, B> { ... }
ap (method)
Signature
ap<B>(fab: Reader<E, (a: A) => B>): Reader<E, B> { ... }
ap_ (method)
Flipped version of ap
Signature
ap_<B, C>(this: Reader<E, (b: B) => C>, fb: Reader<E, B>): Reader<E, C> { ... }
chain (method)
Signature
chain<B>(f: (a: A) => Reader<E, B>): Reader<E, B> { ... }
local (method)
Signature
local<E2 = E>(f: (e: E2) => E): Reader<E2, A> { ... }
Added in v1.6.1
URI (constant)
Signature
export const URI = ...
reader (constant)
Signature
export const reader: Monad2<URI> & Profunctor2<URI> & Category2<URI> & Strong2<URI> & Choice2<URI> = ...
Added in v1.0.0
ask (function)
reads the current context
Signature
export const ask = <E>(): Reader<E, E> => ...
Added in v1.0.0
asks (function)
Projects a value from the global context in a Reader
Signature
export const asks = <E, A>(f: (e: E) => A): Reader<E, A> => ...
Added in v1.0.0
getMonoid (function)
Signature
export const getMonoid = <E, A>(M: Monoid<A>): Monoid<Reader<E, A>> => ...
Added in v1.14.0
getSemigroup (function)
Signature
export const getSemigroup = <E, A>(S: Semigroup<A>): Semigroup<Reader<E, A>> => ...
Added in v1.14.0
local (function)
changes the value of the local context during the execution of the action fa
Signature
export const local = <E, E2 = E>(f: (e: E2) => E) => <A>(fa: Reader<E, A>): Reader<E2, A> => ...
Added in v1.0.0