Skip to content

Latest commit

 

History

History
97 lines (62 loc) · 932 Bytes

Task.md

File metadata and controls

97 lines (62 loc) · 932 Bytes

MODULE Task

Task

data

constructor(readonly run: Lazy<Promise<A>>) {}

Methods

ap

<B>(fab: Task<(a: A) => B>): Task<B>

ap_

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

chain

<B>(f: (a: A) => Task<B>): Task<B>

inspect

(): string

map

<B>(f: (a: A) => B): Task<B>

toString

(): string

task

instance

Monad1<URI>

fromIO

function

<A>(io: IO<A>): Task<A>

Lifts an IO action into a Task

getMonoid

function

<A>(M: Monoid<A>): Monoid<Task<A>>

getRaceMonoid

function

<A = never>(): Monoid<Task<A>>

getSemigroup

function

<A>(S: Semigroup<A>): Semigroup<Task<A>>

tryCatch

function

<L, A>(f: Lazy<Promise<A>>, onrejected: (reason: {}) => L): Task<Either<L, A>>