Overview
IO<A>
represents a synchronous computation that yields a value of type A
and never fails.
If you want to represent a synchronous computation that may fail, please see IOEither
.
Table of contents
- URI (type alias)
- IO (class)
- URI (constant)
- io (constant)
- getMonoid (function)
- getSemigroup (function)
URI (type alias)
Signature
export type URI = typeof URI
IO (class)
Signature
export class IO<A> {
constructor(readonly run: Lazy<A>) { ... }
...
}
Added in v1.0.0
map (method)
Signature
map<B>(f: (a: A) => B): IO<B> { ... }
ap (method)
Signature
ap<B>(fab: IO<(a: A) => B>): IO<B> { ... }
ap_ (method)
Flipped version of ap
Signature
ap_<B, C>(this: IO<(b: B) => C>, fb: IO<B>): IO<C> { ... }
applyFirst (method)
Combine two effectful actions, keeping only the result of the first
Signature
applyFirst<B>(fb: IO<B>): IO<A> { ... }
Added in v1.6.0
applySecond (method)
Combine two effectful actions, keeping only the result of the second
Signature
applySecond<B>(fb: IO<B>): IO<B> { ... }
Added in v1.5.0
chain (method)
Signature
chain<B>(f: (a: A) => IO<B>): IO<B> { ... }
inspect (method)
Signature
inspect(): string { ... }
toString (method)
Signature
toString(): string { ... }
URI (constant)
Signature
export const URI = ...
io (constant)
Signature
export const io: Monad1<URI> & MonadIO1<URI> = ...
Added in v1.0.0
getMonoid (function)
Signature
export const getMonoid = <A>(M: Monoid<A>): Monoid<IO<A>> => ...
Added in v1.0.0
getSemigroup (function)
Signature
export const getSemigroup = <A>(S: Semigroup<A>): Semigroup<IO<A>> => ...
Added in v1.0.0