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 an applyK function to Kleisli. #2563

Merged
merged 1 commit into from
Jan 14, 2019
Merged

Add an applyK function to Kleisli. #2563

merged 1 commit into from
Jan 14, 2019

Conversation

diesalbla
Copy link
Contributor

We add an applyK function to the Kleisli companion object. This takes a parameter of type A, and generates a natural transformation (FunctionK) from Kleisli[F,A,?] to F, i.e., it maps over the Kleisli object by applying it to the given parameter.

An alternative name for this function could be dipK, or something that conveys the idea of it being contrary to the liftK function.

kailuowang
kailuowang previously approved these changes Oct 18, 2018
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.

thanks

@kailuowang kailuowang dismissed their stale review October 18, 2018 12:39

didn't catch build error

@kailuowang
Copy link
Contributor

@diesalbla are you still interested in fixing the doctest?

@LukaJCB LukaJCB self-requested a review January 12, 2019 15:57
@diesalbla
Copy link
Contributor Author

diesalbla commented Jan 12, 2019

@kailuowang @peterneyens Fixed the doctests, and used mapK within the EitherT transformer. Could you take another look?

@kailuowang
Copy link
Contributor

Oh we can't add it the trait without breaking Binary compatibility, make just add it to the companion

@diesalbla
Copy link
Contributor Author

Did you mean the Kleisli companion object?

@kailuowang
Copy link
Contributor

Yup

We add an `applyK` function to the `Kleisli` companion object.
This takes a parameter of type `A`, and generates a natural
transformation (`FunctionK`) from `Kleisli[F,A,?]` to `F`, i.e.,
it maps over the kleisli by applying it to the given parameter.
@codecov-io
Copy link

codecov-io commented Jan 13, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2563      +/-   ##
==========================================
+ Coverage   95.16%   95.16%   +<.01%     
==========================================
  Files         365      365              
  Lines        6777     6778       +1     
  Branches      302      294       -8     
==========================================
+ Hits         6449     6450       +1     
  Misses        328      328
Impacted Files Coverage Δ
core/src/main/scala/cats/data/Kleisli.scala 97.29% <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 e18523c...f805508. Read the comment docs.

@kailuowang kailuowang added this to the 1.6 milestone Jan 14, 2019
@kailuowang kailuowang merged commit 31082eb into typelevel:master Jan 14, 2019
@diesalbla diesalbla deleted the Kleisli_applyK branch January 19, 2019 18:41
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.

5 participants