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 guard to Alternative #1939

Merged
merged 1 commit into from
Sep 29, 2017
Merged

Conversation

SystemFw
Copy link
Contributor

This PR adds guard, a small function on Alternative which I personally find pretty useful.

guard: Boolean => F[Unit]

Which returns Alternative[F].empty if the the boolean is false, and ().pure[F] if true

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! :)

@codecov-io
Copy link

codecov-io commented Sep 29, 2017

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1939      +/-   ##
==========================================
+ Coverage   95.55%   95.55%   +<.01%     
==========================================
  Files         248      248              
  Lines        4451     4454       +3     
  Branches      118      121       +3     
==========================================
+ Hits         4253     4256       +3     
  Misses        198      198
Impacted Files Coverage Δ
core/src/main/scala/cats/Alternative.scala 88.88% <100%> (+1.38%) ⬆️
core/src/main/scala/cats/syntax/alternative.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 66b4ac7...de1b2fa. Read the comment docs.

@LukaJCB LukaJCB merged commit 9f976e3 into typelevel:master Sep 29, 2017
@kailuowang kailuowang added this to the 1.0.0-RC1 milestone Oct 13, 2017
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