← Back

Source

io

Monad1<URI> & MonadIO1<URI>

Added in v1.0.0 (instance)

IO

constructor(readonly run: Lazy<A>) {}

Added in v1.0.0 (data)

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.

ap

<B>(fab: IO<(a: A) => B>): IO<B>

Added in v1.0.0 (method)

ap_

<B, C>(this: IO<(b: B) => C>, fb: IO<B>): IO<C>

Added in v1.0.0 (method)

Flipped version of ap

applyFirst

<B>(fb: IO<B>): IO<A>

Added in v1.6.0 (method)

Combine two effectful actions, keeping only the result of the first

applySecond

<B>(fb: IO<B>): IO<B>

Added in v1.5.0 (method)

Combine two effectful actions, keeping only the result of the second

chain

<B>(f: (a: A) => IO<B>): IO<B>

Added in v1.0.0 (method)

inspect

(): string

Added in v1.0.0 (method)

map

<B>(f: (a: A) => B): IO<B>

Added in v1.0.0 (method)

toString

(): string

Added in v1.0.0 (method)

getMonoid

<A>(M: Monoid<A>): Monoid<IO<A>>

Added in v1.0.0 (function)

getSemigroup

<A>(S: Semigroup<A>): Semigroup<IO<A>>

Added in v1.0.0 (function)