-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
It's easier to show using type signatures. Should it be like the following?
parallel(tasks: Array<Task<S, F>>): Task<Array<S>, F>
race (tasks: Array<Task<S, F>>): Task<S, Array<F>>
The description of race would change from:
Given array of tasks creates a task that completes with the earliest successful or failure value
to:
Given array of tasks creates a task that completes with the earliest successful value or, if all tasks fail, with array of failure values.
I don't have strong opinion yet, just discovered that we could make parallel and race symmetrical, and thought that maybe it's a good idea. Need to consider all the use-cases...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels