Link Search Menu Expand Document

StateReaderObservableEither overview

Added in v0.6.10


Table of contents


Apply

ap

Apply a function to an argument under a type constructor.

Signature

export declare const ap: <S, R, E, A>(
  fa: StateReaderObservableEither<S, R, E, A>
) => <B>(fab: StateReaderObservableEither<S, R, E, (a: A) => B>) => StateReaderObservableEither<S, R, E, B>

Added in v0.6.10

Bifunctor

bimap

Signature

export declare const bimap: <E, G, A, B>(
  f: (e: E) => G,
  g: (a: A) => B
) => <S, R>(fa: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, G, B>

Added in v0.6.10

mapLeft

Signature

export declare const mapLeft: <E, G>(
  f: (e: E) => G
) => <S, R, A>(fa: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, G, A>

Added in v0.6.10

Functor

map

map can be used to turn functions (a: A) => B into functions (fa: F<A>) => F<B> whose argument and return types use the type constructor F to represent some computational context.

Signature

export declare const map: <A, B>(
  f: (a: A) => B
) => <S, R, E>(fa: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, E, B>

Added in v0.6.10

Monad

chain

Signature

export declare const chain: <S, R, E, A, B>(
  f: (a: A) => StateReaderObservableEither<S, R, E, B>
) => (ma: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, E, B>

Added in v0.6.10

chainW

Less strict version of chain.

Signature

export declare const chainW: <A, S, R2, E2, B>(
  f: (a: A) => StateReaderObservableEither<S, R2, E2, B>
) => <R1, E1>(ma: StateReaderObservableEither<S, R1, E1, A>) => StateReaderObservableEither<S, R1 & R2, E2 | E1, B>

Added in v0.6.12

MonadThrow

throwError

Signature

export declare const throwError: <S, R, E, A>(e: E) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

combinators

apFirst

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

Derivable from Apply.

Signature

export declare const apFirst: <S, R, E, B>(
  fb: StateReaderObservableEither<S, R, E, B>
) => <A>(fa: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

apSecond

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

Derivable from Apply.

Signature

export declare const apSecond: <S, R, E, B>(
  fb: StateReaderObservableEither<S, R, E, B>
) => <A>(fa: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, E, B>

Added in v0.6.10

chainFirst

Composes computations in sequence, using the return value of one computation to determine the next computation and keeping only the result of the first.

Derivable from Monad.

Signature

export declare const chainFirst: <S, R, E, A, B>(
  f: (a: A) => StateReaderObservableEither<S, R, E, B>
) => (ma: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

flatten

Derivable from Monad.

Signature

export declare const flatten: <S, R, E, A>(
  mma: StateReaderObservableEither<S, R, E, StateReaderObservableEither<S, R, E, A>>
) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

constructors

fromIO

Signature

export declare const fromIO: <S, R, E, A>(fa: IO<A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

fromObservable

Signature

export declare const fromObservable: <S, R, E, A>(fa: Observable<A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

fromReaderObservableEither

Signature

export declare const fromReaderObservableEither: <S, R, E, A>(
  ma: ROE.ReaderObservableEither<R, E, A>
) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

fromTask

Signature

export declare const fromTask: <S, R, E, A>(fa: Task<A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

get

Signature

export declare const get: <R, E, S>() => StateReaderObservableEither<S, R, E, S>

Added in v0.6.10

gets

Signature

export declare const gets: <S, R, E, A>(f: (s: S) => A) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

left

Signature

export declare const left: <S, R, E = never, A = never>(e: E) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

modify

Signature

export declare const modify: <R, E, S>(f: (s: S) => S) => StateReaderObservableEither<S, R, E, void>

Added in v0.6.10

put

Signature

export declare const put: <R, E, S>(s: S) => StateReaderObservableEither<S, R, E, void>

Added in v0.6.10

Signature

export declare const right: <S, R, E = never, A = never>(a: A) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

model

StateReaderObservableEither (interface)

Signature

export interface StateReaderObservableEither<S, R, E, A> {
  (s: S): ROE.ReaderObservableEither<R, E, [A, S]>
}

Added in v0.6.10

utils

Applicative

Signature

export declare const Applicative: Applicative4<'StateReaderObservableEither'>

Added in v0.6.12

Apply

Signature

export declare const Apply: Apply4<'StateReaderObservableEither'>

Added in v0.6.12

Bifunctor

Signature

export declare const Bifunctor: Bifunctor4<'StateReaderObservableEither'>

Added in v0.6.12

Functor

Signature

export declare const Functor: Functor4<'StateReaderObservableEither'>

Added in v0.6.12

Monad

Signature

export declare const Monad: Monad4<'StateReaderObservableEither'>

Added in v0.6.12

MonadIO

Signature

export declare const MonadIO: MonadIO4<'StateReaderObservableEither'>

Added in v0.6.12

MonadObservable

Signature

export declare const MonadObservable: MonadObservable4<'StateReaderObservableEither'>

Added in v0.6.12

MonadTask

Signature

export declare const MonadTask: MonadTask4<'StateReaderObservableEither'>

Added in v0.6.12

MonadThrow

Signature

export declare const MonadThrow: MonadThrow4<'StateReaderObservableEither'>

Added in v0.6.12

URI

Signature

export declare const URI: 'StateReaderObservableEither'

Added in v0.6.10

URI (type alias)

Signature

export type URI = typeof URI

Added in v0.6.10

bind

Signature

export declare const bind: <K extends string, S, R, E, A, B>(
  name: Exclude<K, keyof A>,
  f: (a: A) => StateReaderObservableEither<S, R, E, B>
) => (
  fa: StateReaderObservableEither<S, R, E, A>
) => StateReaderObservableEither<S, R, E, { [P in K | keyof A]: P extends keyof A ? A[P] : B }>

Added in v0.6.11

bindTo

Signature

export declare const bindTo: <K extends string>(
  name: K
) => <S, R, E, A>(fa: StateReaderObservableEither<S, R, E, A>) => StateReaderObservableEither<S, R, E, { [P in K]: A }>

Added in v0.6.11

bindW

Signature

export declare const bindW: <K extends string, S, R2, E2, A, B>(
  name: Exclude<K, keyof A>,
  f: (a: A) => StateReaderObservableEither<S, R2, E2, B>
) => <R1, E1>(
  fa: StateReaderObservableEither<S, R1, E1, A>
) => StateReaderObservableEither<S, R1 & R2, E2 | E1, { [P in K | keyof A]: P extends keyof A ? A[P] : B }>

Added in v0.6.12

evaluate

Signature

export declare const evaluate: <S>(
  s: S
) => <R, E, A>(ma: StateReaderObservableEither<S, R, E, A>) => ROE.ReaderObservableEither<R, E, A>

Added in v0.6.10

execute

Signature

export declare const execute: <S>(
  s: S
) => <R, E, A>(ma: StateReaderObservableEither<S, R, E, A>) => ROE.ReaderObservableEither<R, E, S>

Added in v0.6.10

filterOrElse

Derivable from MonadThrow.

Signature

export declare const filterOrElse: {
  <E, A, B extends A>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <S, R>(
    ma: StateReaderObservableEither<S, R, E, A>
  ) => StateReaderObservableEither<S, R, E, B>
  <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <S, R>(
    ma: StateReaderObservableEither<S, R, E, A>
  ) => StateReaderObservableEither<S, R, E, A>
}

Added in v0.6.10

fromEither

Derivable from MonadThrow.

Signature

export declare const fromEither: <S, R, E, A>(ma: E.Either<E, A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

fromOption

Derivable from MonadThrow.

Signature

export declare const fromOption: <E>(
  onNone: () => E
) => <S, R, A>(ma: Option<A>) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.10

fromPredicate

Derivable from MonadThrow.

Signature

export declare const fromPredicate: {
  <E, A, B extends A>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <S, R>(
    a: A
  ) => StateReaderObservableEither<S, R, E, B>
  <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <S, R>(a: A) => StateReaderObservableEither<S, R, E, A>
}

Added in v0.6.10

of

Signature

export declare const of: <S, R, E, A>(a: A) => StateReaderObservableEither<S, R, E, A>

Added in v0.6.12

stateReaderObservableEither

Signature

export declare const stateReaderObservableEither: MonadObservable4<'StateReaderObservableEither'> &
  Bifunctor4<'StateReaderObservableEither'> &
  MonadThrow4<'StateReaderObservableEither'>

Added in v0.6.10