Link

StateFuture overview

Added in v0.6.5


Table of contents


StateFuture (interface)

Signature

export interface StateFuture<S, E, A> {
  (s: S): F.Future<E, [A, S]>
}

Added in v0.6.5

URI (type alias)

Signature

export type URI = typeof URI

Added in v0.6.5

URI

Signature

export const URI: "StateFuture" = ...

Added in v0.6.5

alt

Signature

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

Added in v0.6.5

ap

Signature

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

Added in v0.6.5

apFirst

Signature

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

Added in v0.6.5

apSecond

Signature

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

Added in v0.6.5

bimap

Signature

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

Added in v0.6.5

chain

Signature

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

Added in v0.6.5

chainEitherK

Signature

export function chainEitherK<E, A, B>(
  f: (a: A) => E.Either<E, B>
): <S>(ma: StateFuture<S, E, A>) => StateFuture<S, E, B> { ... }

Added in v0.6.5

chainFirst

Signature

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

Added in v0.6.5

chainFutureK

Signature

export function chainFutureK<E, A, B>(
  f: (a: A) => F.Future<E, B>
): <S>(ma: StateFuture<S, E, A>) => StateFuture<S, E, B> { ... }

Added in v0.6.5

evalState

Signature

export const evalState: <S, E, A>(ma: StateFuture<S, E, A>, s: S) => F.Future<E, A> = ...

Added in v0.6.5

execState

Signature

export const execState: <S, E, A>(ma: StateFuture<S, E, A>, s: S) => F.Future<E, S> = ...

Added in v0.6.5

filterOrElse

Signature

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

Added in v0.6.5

flatten

Signature

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

Added in v0.6.5

fromEither

Signature

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

Added in v0.6.5

fromEitherK

Signature

export function fromEitherK<E, A extends Array<unknown>, B>(
  f: (...a: A) => E.Either<E, B>
): <S>(...a: A) => StateFuture<S, E, B> { ... }

Added in v0.6.5

fromFuture

Signature

export const fromFuture: <S, E, A>(ma: F.Future<E, A>) => StateFuture<S, E, A> = ...

Added in v0.6.5

fromFutureK

Signature

export function fromFutureK<E, A extends Array<unknown>, B>(
  f: (...a: A) => F.Future<E, B>
): <S>(...a: A) => StateFuture<S, E, B> { ... }

Added in v0.6.5

fromOption

Signature

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

Added in v0.6.5

fromPredicate

Signature

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

Added in v0.6.5

get

Signature

export const get: <S, E = never>() => StateFuture<S, E, S> = ...

Added in v0.6.5

gets

Signature

export const gets: <S, E = never, A = never>(f: (s: S) => A) => StateFuture<S, E, A> = ...

Added in v0.6.5

left

Signature

export function left<S, E, A = never>(e: E): StateFuture<S, E, A> { ... }

Added in v0.6.5

leftIO

Signature

export function leftIO<S, E, A = never>(me: IO<E>): StateFuture<S, E, A> { ... }

Added in v0.6.5

leftState

Signature

export function leftState<S, E, A = never>(me: State<S, E>): StateFuture<S, E, A> { ... }

Added in v0.6.5

leftTask

Signature

export function leftTask<S, E, A = never>(me: Task<E>): StateFuture<S, E, A> { ... }

Added in v0.6.5

map

Signature

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

Added in v0.6.5

mapLeft

Signature

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

Added in v0.6.5

modify

Signature

export const modify: <S, E = never>(f: (s: S) => S) => StateFuture<S, E, void> = ...

Added in v0.6.5

orElse

Signature

export function orElse<S, E, M, A>(
  f: (e: E) => StateFuture<S, M, A>
): (ma: StateFuture<S, E, A>) => StateFuture<S, M, A> { ... }

Added in v0.6.5

put

Signature

export const put: <S, E = never>(s: S) => StateFuture<S, E, void> = ...

Added in v0.6.5

right

Signature

export const right: <S, E = never, A = never>(a: A) => StateFuture<S, E, A> = ...

Added in v0.6.5

rightIO

Signature

export function rightIO<S, E = never, A = never>(ma: IO<A>): StateFuture<S, E, A> { ... }

Added in v0.6.5

rightState

Signature

export const rightState: <S, E = never, A = never>(ma: State<S, A>) => StateFuture<S, E, A> = ...

Added in v0.6.5

rightTask

Signature

export function rightTask<S, E = never, A = never>(ma: Task<A>): StateFuture<S, E, A> { ... }

Added in v0.6.5

stateFuture

Signature

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

Added in v0.6.5