You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm calling f = Future.fromPromise(p) on a promise containing an Either. I'd like to do f.map (or something like that) on the result and operate on the right value of the Either, possibly returning another future. I can't find a built-in function that does this, so I'm resorting to f.flatMap((e) => Future.of(() => fn(e))).
Is there a better way to do this?
The text was updated successfully, but these errors were encountered:
I'm calling
f = Future.fromPromise(p)
on a promise containing anEither
. I'd like to dof.map
(or something like that) on the result and operate on the right value of theEither
, possibly returning another future. I can't find a built-in function that does this, so I'm resorting tof.flatMap((e) => Future.of(() => fn(e)))
.Is there a better way to do this?
The text was updated successfully, but these errors were encountered: