Closed wookieb closed 4 years ago
@wookieb - great - I'll wait with 0.9.1
for this feature then :)
Just maybe add also .toPromise()
to Either instances ;)
Not sure about how it should work. Return rejected promise for Left
?
@wookieb Promise if rejected holds an Error or any other Failure value, so it should be on the left.
Left(xyz) --> Promise.reject(xyz)
Right(xyz) --> Promise.resolve(xyz)
.cata(Promise.reject, Promise.resolve)
? :D
Ok. Just few minutes
I found that monet.js does not support async functions very well. How about adding
Either.fromPromise
? I can handle that...