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

Added StackSafeMonad mixin #1736

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

djspiewak
Copy link
Member

I'm tired of defining the same tailRecM over and over again when the underlying monad is already known to be stack-safe. This mixin provides a more convenient way of achieving this goal. Obviously, the implementation is only valid if the underlying monad has a stack-safe flatMap, but if it has a stack-safe flatMap, then this is almost certainly going to be the implementation. May as well reduce some of the boilerplate in that case.

Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@codecov-io
Copy link

codecov-io commented Jun 20, 2017

Codecov Report

Merging #1736 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1736      +/-   ##
==========================================
- Coverage   94.03%   94.02%   -0.01%     
==========================================
  Files         252      253       +1     
  Lines        4189     4185       -4     
  Branches      154      163       +9     
==========================================
- Hits         3939     3935       -4     
  Misses        250      250
Impacted Files Coverage Δ
core/src/main/scala/cats/instances/future.scala 75% <100%> (-1.48%) ⬇️
core/src/main/scala/cats/StackSafeMonad.scala 100% <100%> (ø)
core/src/main/scala/cats/Eval.scala 96.96% <100%> (-0.14%) ⬇️
free/src/main/scala/cats/free/Free.scala 85.71% <100%> (-0.83%) ⬇️

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 ca7c8c0...312ce51. Read the comment docs.

@djspiewak
Copy link
Member Author

Merging with two sign-offs.

@djspiewak djspiewak merged commit 312ce51 into typelevel:master Jun 20, 2017
@djspiewak djspiewak deleted the feature/stack-safe-monad branch June 20, 2017 21:08
@kailuowang kailuowang modified the milestone: 1.0.0-MF Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants