Skip to content
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 leftFlatMap to Either #2149

Merged
merged 2 commits into from
Jan 12, 2018
Merged

Conversation

rohanshah
Copy link
Contributor

Motivation

Either should have leftFlatMap for cases when you want to leftMap a function that returns an Either and flatten the total result.

@codecov-io
Copy link

codecov-io commented Jan 11, 2018

Codecov Report

Merging #2149 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2149      +/-   ##
==========================================
+ Coverage   94.66%   94.67%   +<.01%     
==========================================
  Files         328      328              
  Lines        5533     5536       +3     
  Branches      199      199              
==========================================
+ Hits         5238     5241       +3     
  Misses        295      295
Impacted Files Coverage Δ
core/src/main/scala/cats/syntax/either.scala 99.14% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65d5933...6c9e95c. Read the comment docs.

@kailuowang
Copy link
Contributor

would love to see some tests

@rohanshah
Copy link
Contributor Author

@kailuowang yeah, I was wondering where to put them. The only test file I found for Either was EitherSuite.scala but that didn't even have a test for flatMap in it.

@kailuowang
Copy link
Contributor

EitherSuite should be the right place. My guess is that flatMap isn't explicitly tested there because it's covered by the law tests

@rohanshah
Copy link
Contributor Author

@kailuowang added tests!

@kailuowang kailuowang added this to the 1.1 milestone Jan 12, 2018
@johnynek johnynek merged commit 5f30a73 into typelevel:master Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants