Table of contents


ReaderEither (interface)

Signature

export interface ReaderEither<R, E, A> extends Reader<R, Either<E, A>> {}

Added in v2.0.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0

URI (constant)

Signature

export const URI: "ReaderEither" = ...

Added in v2.0.0

left (constant)

Signature

export const left: <R, E = ...

Added in v2.0.0

leftReader (constant)

Signature

export const leftReader: <R, E = ...

Added in v2.0.0

readerEither (constant)

Signature

export const readerEither: Monad3<URI> & Bifunctor3<URI> & Alt3<URI> & MonadThrow3<URI> = ...

Added in v2.0.0

right (constant)

Signature

export const right: <R, E = ...

Added in v2.0.0

rightReader (constant)

Signature

export const rightReader: <R, E = ...

Added in v2.0.0

swap (constant)

Signature

export const swap: <R, E, A>(ma: ReaderEither<R, E, A>) => ReaderEither<R, A, E> = ...

Added in v2.0.0

ask (function)

Signature

export function ask<R, E = never>(): ReaderEither<R, E, R> { ... }

Added in v2.0.0

asks (function)

Signature

export function asks<R, E = never, A = never>(f: (r: R) => A): ReaderEither<R, E, A> { ... }

Added in v2.0.0

fold (function)

Signature

export function fold<R, E, A, B>(
  onLeft: (e: E) => Reader<R, B>,
  onRight: (a: A) => Reader<R, B>
): (ma: ReaderEither<R, E, A>) => Reader<R, B> { ... }

Added in v2.0.0

getApplyMonoid (function)

Signature

export function getApplyMonoid<R, E, A>(M: Monoid<A>): Monoid<ReaderEither<R, E, A>> { ... }

Added in v2.0.0

getApplySemigroup (function)

Signature

export function getApplySemigroup<R, E, A>(S: Semigroup<A>): Semigroup<ReaderEither<R, E, A>> { ... }

Added in v2.0.0

getOrElse (function)

Signature

export function getOrElse<R, E, A>(onLeft: (e: E) => Reader<R, A>): (ma: ReaderEither<R, E, A>) => Reader<R, A> { ... }

Added in v2.0.0

getReaderValidation (function)

Signature

export function getReaderValidation<E>(
  S: Semigroup<E>
): Monad3C<URI, E> & Bifunctor3C<URI, E> & Alt3C<URI, E> & MonadThrow3C<URI, E> { ... }

Added in v2.3.0

getSemigroup (function)

Signature

export function getSemigroup<R, E, A>(S: Semigroup<A>): Semigroup<ReaderEither<R, E, A>> { ... }

Added in v2.0.0

local (function)

Signature

export function local<Q, R>(f: (f: Q) => R): <E, A>(ma: ReaderEither<R, E, A>) => ReaderEither<Q, E, A> { ... }

Added in v2.0.0

orElse (function)

Signature

export function orElse<R, E, A, M>(
  onLeft: (e: E) => ReaderEither<R, M, A>
): (ma: ReaderEither<R, E, A>) => ReaderEither<R, M, A> { ... }

Added in v2.0.0

alt (export)

Signature

<R, E, A>(that: () => ReaderEither<R, E, A>) => (fa: ReaderEither<R, E, A>) => ReaderEither<R, E, A>

Added in v2.0.0

ap (export)

Signature

<R, E, A>(fa: ReaderEither<R, E, A>) => <B>(fab: ReaderEither<R, E, (a: A) => B>) => ReaderEither<R, E, B>

Added in v2.0.0

apFirst (export)

Signature

<R, E, B>(fb: ReaderEither<R, E, B>) => <A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, A>

Added in v2.0.0

apSecond (export)

Signature

<R, E, B>(fb: ReaderEither<R, E, B>) => <A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, B>

Added in v2.0.0

bimap (export)

Signature

<E, G, A, B>(f: (e: E) => G, g: (a: A) => B) => <R>(fa: ReaderEither<R, E, A>) => ReaderEither<R, G, B>

Added in v2.0.0

chain (export)

Signature

<R, E, A, B>(f: (a: A) => ReaderEither<R, E, B>) => (ma: ReaderEither<R, E, A>) => ReaderEither<R, E, B>

Added in v2.0.0

chainFirst (export)

Signature

<R, E, A, B>(f: (a: A) => ReaderEither<R, E, B>) => (ma: ReaderEither<R, E, A>) => ReaderEither<R, E, A>

Added in v2.0.0

filterOrElse (export)

Signature

{ <E, A, B>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <R>(ma: ReaderEither<R, E, A>) => ReaderEither<R, E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R>(ma: ReaderEither<R, E, A>) => ReaderEither<R, E, A>; }

Added in v2.0.0

flatten (export)

Signature

<R, E, A>(mma: ReaderEither<R, E, ReaderEither<R, E, A>>) => ReaderEither<R, E, A>

Added in v2.0.0

fromEither (export)

Signature

<R, E, A>(ma: E.Either<E, A>) => ReaderEither<R, E, A>

Added in v2.0.0

fromOption (export)

Signature

<E>(onNone: () => E) => <R, A>(ma: Option<A>) => ReaderEither<R, E, A>

Added in v2.0.0

fromPredicate (export)

Signature

{ <E, A, B>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <U>(a: A) => ReaderEither<U, E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R>(a: A) => ReaderEither<R, E, A>; }

Added in v2.0.0

map (export)

Signature

<A, B>(f: (a: A) => B) => <R, E>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, B>

Added in v2.0.0

mapLeft (export)

Signature

<E, G>(f: (e: E) => G) => <R, A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, G, A>

Added in v2.0.0