-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
First thank you for this library, it's been a joy to work with over Js.Promise.
A question: I feel like I'm constantly reaching for functions of signature:
let tryIfOk: (Future.t(Belt.Result.t('c, 'b)), 'c => Belt.Result.t('a, 'b)) =>
Future.t(Belt.Result.t('a, 'b))
let tryIfErr: (Future.t(Belt.Result.t('b, 'c)), 'c => Belt.Result.t('a, 'b)) =>
Future.t(Belt.Result.t('a, 'b))Is there a simple way to compose this out of other functions already provided? It seems like no matter how I go about this in my code I'm doing a lot of ugly manual wrapping (which does work, it just feels extremely inelegant).
Thank you!
Metadata
Metadata
Assignees
Labels
No labels