Closed mchaver closed 3 years ago
hi @mchaver , thanks for your interest. we would like to have belt.Option first
@mchaver to mirror the Result type on native side?
@bobzhang, @chenglou Thanks. Yes to mirror the result type. It could be called result as well, that doesn't really matter. In some of my own packages I define functions like catSomes
and arrayCatSomes
to get all of the Some values from a list/array of Options, and things like rights
, lefts
, isLeft
, isRight
, map
, bimap
, fold
, etc. for either/result. Ideally this very generic container functions would live in the stdlib. Tomorrow I'll try to put together a PR for Belt and request feedback from you guys.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If I made a PR for Belt to add support for an Either type and related functions, is that something you would consider merging, or is there some sort of guidelines for the sort of things you would support in Belt?