Link

Future overview

Added in v0.5.0


Table of contents


Future (interface)

Signature

export interface Future<E, A> extends F.FutureInstance<E, A> {}

Added in v0.6.4

URI (type alias)

Signature

export type URI = typeof URI

Added in v0.5.0

URI

Signature

export const URI: "Fluture/Future" = ...

Added in v0.5.0

alt

Signature

<E, A>(that: () => Future<E, A>) => (fa: Future<E, A>) => Future<E, A>

Added in v0.6.4

ap

Signature

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

Added in v0.6.4

apFirst

Signature

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

Added in v0.6.4

apSecond

Signature

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

Added in v0.6.4

bimap

Signature

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

Added in v0.6.4

chain

Signature

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

Added in v0.6.4

chainFirst

Signature

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

Added in v0.6.4

delay

Signature

export function delay(millis: number): <A>(ma: Future<never, A>) => Future<never, A> { ... }

Added in v0.6.4

flatten

Signature

<E, A>(mma: Future<E, Future<E, A>>) => Future<E, A>

Added in v0.6.4

fold

Signature

export function fold<E, A, B>(
  onLeft: (left: E) => Task<B>,
  onRight: (right: A) => Task<B>
): (ma: Future<E, A>) => Task<B> { ... }

Added in v0.6.4

fromEither

Signature

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

Added in v0.6.4

fromOption

Signature

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

Added in v0.6.4

fromPredicate

Signature

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

Added in v0.6.4

future

Signature

export const future: Monad2<URI> & Bifunctor2<URI> & ChainRec2<URI> & Alt2<URI> & MonadThrow2<URI> & MonadTask2<URI> = ...

Added in v0.5.0

futurify

Signature

export function futurify<L, R>(f: (cb: (e: L | null | undefined, r?: R) => void) => void): () => Future<L, R>
export function futurify<A, L, R>(
  f: (a: A, cb: (e: L | null | undefined, r?: R) => void) => void
): (a: A) => Future<L, R>
export function futurify<A, B, L, R>(
  f: (a: A, b: B, cb: (e: L | null | undefined, r?: R) => void) => void
): (a: A, b: B) => Future<L, R>
export function futurify<A, B, C, L, R>(
  f: (a: A, b: B, c: C, cb: (e: L | null | undefined, r?: R) => void) => void
): (a: A, b: B, c: C) => Future<L, R>
export function futurify<A, B, C, D, L, R>(
  f: (a: A, b: B, c: C, d: D, cb: (e: L | null | undefined, r?: R) => void) => void
): (a: A, b: B, c: C, d: D) => Future<L, R>
export function futurify<A, B, C, D, E, L, R>(
  f: (a: A, b: B, c: C, d: D, e: E, cb: (e: L | null | undefined, r?: R) => void) => void
): (a: A, b: B, c: C, d: D, e: E) => Future<L, R> { ... }

Added in v0.6.4

left

Signature

export const left: <E = never, A = never>(e: E) => Future<E, A> = ...

Added in v0.6.4

leftIO

Signature

export function leftIO<E = never, A = never>(ma: IO<E>): Future<E, A> { ... }

Added in v0.6.4

leftTask

Signature

export function leftTask<E = never, A = never>(ma: Task<E>): Future<E, A> { ... }

Added in v0.6.4

map

Signature

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

Added in v0.6.4

mapLeft

Signature

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

Added in v0.6.4

orElse

Signature

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

Added in v0.6.4

right

Signature

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

Added in v0.6.4

rightIO

Signature

export const rightIO: <E = never, A = never>(ma: IO<A>) => Future<E, A> = ...

Added in v0.6.4

rightTask

Signature

export const rightTask: <E = never, A = never>(ma: Task<A>) => Future<E, A> = ...

Added in v0.6.4

swap

Signature

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

Added in v0.6.4