Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Convert Promise-returning functions to Task-returning functions #97
Folktale should support converting from Promises to a more usable type. Because Promises are already eventual values, it makes sense to convert the functions that create them to functions creating Tasks instead of converting actual Promises to Tasks.
In essence, a function yielding a Promise, like:
f :: (Any...) => Promise Error Any
Would become a function yielding a Task, like:
promiseFunctionToTask(f) :: (Any...) => Task Error Any
Where this goes?
Refer to existing