The container for instance methods for the Task structure.
This API is still experimental, so it may change or be removed in future versions. You should not rely on it for production applications.
The container for instance methods for the Task structure.
Constructs a new task that awaits both tasks to resolve. The result of the new task is a tuple containing the results of the left and right tasks, if they all succeed, or the first failure if they fail.
Combines two tasks such that the resulting task assimilates the result of the first one to resolve.
Executes a Task and returns a TaskExecution
object representing the execution.
Part of the Applicative instance for Fantasy Land 1.x. See the apply
method for details.
Part of the Applicative instance for Fantasy Land 2.x+. See the apply
method for details.
Part of the Bifunctor instance for Fantasy Land 2.x+. See the bimap
method for details.
Part of the Monad instance for Fantasy Land 2.x+. See the chain
method for details.
Part of the Functor instance for Fantasy Land 2.x+. See the map
method for details.
Chooses and executes a function for each variant in a Task. The function must return a new task, whose value and state will be assimilated.
Transforms a failed task's value and state.
Inverts the state of a Task. That is, turns successful tasks into failed ones, and failed tasks into successful ones.
Applies the function in the left task to the value on the right task. The left task is ran to completion before the right task is started.
Transforms the rejected or resolved values of a Task with a function. The state of the task is not changed.
Transforms the value and state of a Task.
Transforms the value of a successful task.
Transforms the value of a failed task.
Tasks model asynchronous processes with automatic resource handling. They are generally constructed with the task
function.