-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
@diesalbla are you still interested in fixing the doctest? |
@kailuowang @peterneyens Fixed the doctests, and used |
Oh we can't add it the trait without breaking Binary compatibility, make just add it to the companion |
Did you mean the |
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 Report
@@ 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
Continue to review full report at Codecov.
|
We add an
applyK
function to theKleisli
companion object. This takes a parameter of typeA
, and generates a natural transformation (FunctionK
) fromKleisli[F,A,?]
toF
, 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 theliftK
function.