-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ior.fromEither
#2057
Add Ior.fromEither
#2057
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
* Create an `Ior` from an `Either`. | ||
* @param eab an `Either` from which the `Ior` should be created | ||
* | ||
* @return [[Ior.Left]] if the `Either` was a `Left`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a whitespace error here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that cats checks for them!
19dfa59
to
7a2fb65
Compare
Codecov Report
@@ Coverage Diff @@
## master #2057 +/- ##
=======================================
Coverage 94.95% 94.95%
=======================================
Files 311 311
Lines 5270 5270
Branches 133 132 -1
=======================================
Hits 5004 5004
Misses 266 266
Continue to review full report at Codecov.
|
Adds the
Ior.fromEither
method. I am aware that there is atoIor
provided viaEitherOps
, but this one is harder to find for newcomers (IMHO :D) and needs the import of theEitherSyntax
.So I added the
Ior.fromEither
which does not require any import and is easily discoverable on theIor
companion.24 Pull Requests (https://24pullrequests.com)