← Back

Source

ioEither

Monad2<URI> & Bifunctor2<URI> & Alt2<URI>

Added in v1.6.0 (instance)

IOEither

constructor(readonly value: IO<Either<L, A>>) {}

Added in v1.6.0 (data)

IOEither<L, A> represents a synchronous computation that either yields a value of type A or fails yielding an error of type L. If you want to represent a synchronous computation that never fails, please see IO.

alt

(fy: IOEither<L, A>): IOEither<L, A>

Added in v1.6.0 (method)

ap

<B>(fab: IOEither<L, (a: A) => B>): IOEither<L, B>

Added in v1.6.0 (method)

ap_

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

Added in v1.6.0 (method)

Flipped version of ap

applyFirst

<B>(fb: IOEither<L, B>): IOEither<L, A>

Added in v1.6.0 (method)

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

applySecond

<B>(fb: IOEither<L, B>): IOEither<L, B>

Added in v1.6.0 (method)

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

bimap

<V, B>(f: (l: L) => V, g: (a: A) => B): IOEither<V, B>

Added in v1.6.0 (method)

chain

<B>(f: (a: A) => IOEither<L, B>): IOEither<L, B>

Added in v1.6.0 (method)

fold

<R>(left: (l: L) => R, right: (a: A) => R): IO<R>

Added in v1.6.0 (method)

map

<B>(f: (a: A) => B): IOEither<L, B>

Added in v1.6.0 (method)

mapLeft

<M>(f: (l: L) => M): IOEither<M, A>

Added in v1.6.0 (method)

orElse

<M>(f: (l: L) => IOEither<M, A>): IOEither<M, A>

Added in v1.6.0 (method)

run

(): Either<L, A>

Added in v1.6.0 (method)

Runs the inner io

fromEither

<L, A>(fa: Either<L, A>): IOEither<L, A>

Added in v1.6.0 (function)

fromLeft

<L, A>(l: L): IOEither<L, A>

Added in v1.6.0 (function)

left

<L, A>(fa: IO<L>): IOEither<L, A>

Added in v1.6.0 (function)

<L, A>(fa: IO<A>): IOEither<L, A>

Added in v1.6.0 (function)

tryCatch

<A>(f: Lazy<A>, onerror: (reason: {}) => Error = toError): IOEither<Error, A>

Added in v1.6.0 (function)