@[inline]
def
Std.Internal.IO.Async.AsyncTask.bind
{α : Type u_1}
{β : Type u_2}
(x : AsyncTask α)
(f : α → AsyncTask β)
:
Create a new AsyncTask
that will run after x
has finished.
If x
:
- errors, return an
AsyncTask
that resolves to the error. - succeeds, run
f
on the result ofx
and return theAsyncTask
produced byf
.
Equations
Instances For
@[inline]
def
Std.Internal.IO.Async.AsyncTask.map
{α : Type u_1}
{β : Type u_2}
(f : α → β)
(x : AsyncTask α)
:
Create a new AsyncTask
that will run after x
has finished.
If x
:
- errors, return an
AsyncTask
that resolves to the error. - succeeds, return an
AsyncTask
that resolves tof x
.
Equations
Instances For
@[inline]
Create an AsyncTask
that resolves to the value of x
.