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

Fix foldA, reduceA, and reduceMapA short-circuiting #3199

Merged
merged 5 commits into from
Dec 10, 2019

Conversation

travisbrown
Copy link
Contributor

As discussed in #3150, the only real reason I can see for foldA and reduceA to exist is because they can short-circuit, while fold(fga)(Applicative.monoid) etc. can't. This change fixes them so they actually do short-circuit, and adds some tests to verify this.

LukaJCB
LukaJCB previously approved these changes Dec 10, 2019
@travisbrown
Copy link
Contributor Author

I went ahead and added the API docs edits in this PR, hope you don't mind, @LukaJCB.

@codecov-io
Copy link

codecov-io commented Dec 10, 2019

Codecov Report

Merging #3199 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3199   +/-   ##
=======================================
  Coverage   93.06%   93.06%           
=======================================
  Files         376      376           
  Lines        7409     7409           
  Branches      197      191    -6     
=======================================
  Hits         6895     6895           
  Misses        514      514
Flag Coverage Δ
#scala_version_212 93.39% <100%> (ø) ⬆️
#scala_version_213 92.83% <100%> (ø) ⬆️
Impacted Files Coverage Δ
core/src/main/scala/cats/Foldable.scala 98.5% <100%> (ø) ⬆️
core/src/main/scala/cats/Reducible.scala 100% <100%> (ø) ⬆️

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 1d9ada4...bc6e5d9. Read the comment docs.

@travisbrown travisbrown added this to the 2.1.0-RC3 milestone Dec 10, 2019
@LukaJCB LukaJCB merged commit f0b813d into typelevel:master Dec 10, 2019
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