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 comonadic comprehensions #91

Merged
merged 7 commits into from
May 7, 2017
Merged

Conversation

pakoito
Copy link
Member

@pakoito pakoito commented May 6, 2017

Closes #88

@pakoito pakoito self-assigned this May 6, 2017
@codecov
Copy link

codecov bot commented May 6, 2017

Codecov Report

Merging #91 into master will increase coverage by 3.17%.
The diff coverage is 87.17%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #91      +/-   ##
============================================
+ Coverage     43.87%   47.05%   +3.17%     
- Complexity      113      120       +7     
============================================
  Files            54       58       +4     
  Lines           800      831      +31     
  Branches        130      131       +1     
============================================
+ Hits            351      391      +40     
+ Misses          399      390       -9     
  Partials         50       50
Impacted Files Coverage Δ Complexity Δ
katz/src/main/kotlin/katz/instances/IdMonad.kt 83.33% <ø> (-2.39%) 0 <0> (ø)
katz/src/main/kotlin/katz/data/Coproduct.kt 66.66% <ø> (+66.66%) 5 <0> (+5) ⬆️
katz/src/main/kotlin/katz/instances/IdComonad.kt 100% <ø> (ø) 0 <0> (ø) ⬇️
...rc/main/kotlin/katz/instances/NonEmptyListMonad.kt 78.57% <ø> (-1.43%) 0 <0> (ø)
katz/src/main/kotlin/katz/typeclasses/Bimonad.kt 0% <0%> (ø) 0 <0> (?)
...tz/src/main/kotlin/katz/typeclasses/Applicative.kt 22.22% <0%> (ø) 0 <0> (ø) ⬇️
katz/src/main/kotlin/katz/data/Id.kt 57.14% <100%> (ø) 1 <0> (ø) ⬇️
katz/src/main/kotlin/katz/typeclasses/Monad.kt 81.81% <100%> (+3.55%) 0 <0> (ø) ⬇️
katz/src/main/kotlin/katz/data/NonEmptyList.kt 57.14% <100%> (ø) 14 <0> (ø) ⬇️
.../main/kotlin/katz/instances/NonEmptyListBimonad.kt 100% <100%> (ø) 0 <0> (?)
... and 10 more

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 fc8d6c0...69337ee. Read the comment docs.

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

this is awesome!, but some of the names are confusing IMO


suspend fun <B> HK<F, B>.bind(): B = bind { this }

suspend fun <B> bind(m: () -> HK<F, B>): B = suspendCoroutineOrReturn { c ->
Copy link
Member

Choose a reason for hiding this comment

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

is bind a good name for this? bind has the semantics of flatMap, whereas this is 'extract'. what about cobind?

Copy link
Member Author

Choose a reason for hiding this comment

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

This should be extract then. Fixed!

@pakoito pakoito merged commit cd5d3e0 into master May 7, 2017
@pakoito pakoito deleted the paco-compadrecompremeuncoco branch May 7, 2017 01:36
ambrusadrianz pushed a commit to ambrusadrianz/arrow that referenced this pull request Oct 22, 2019
* arrow-kt#85: Add Enum encoder and decoder

* arrow-kt#85: Add Enum test

* arrow-kt#85: Add negative tests for enum decoder

* arrow-kt#85: Clean up test names and move the enum code to the correct package

* move enum instances to its companion object

* arrow-kt#85: Add enum section to docs

* arrow-kt#85: Docs formatting

* arrow-kt#85: Combine enum docs fragments

* arrow-kt#85: Import helios.instances.*

* arrow-kt#85: Silence Ank

* arrow-kt#85: Split up section on Enum

* arrow-kt#85: Fix Enum decoder return type

* Update docs/docs/coding/README.md

Co-Authored-By: Adrian Ramirez Fornell <[email protected]>
rachelcarmena pushed a commit that referenced this pull request Feb 24, 2021
* Disconnect arrow-optics-mtl and comment tests

* Include back arrow-optics-mtl and move commented tests from arrow-optics to arrow-optics-mtl

* Disconnect arrow-optics-mtl

* Remove arrow-optics-mtl from arrow-docs

* Add arrow-optics to arrow-docs and remove arrow-optics-mtl docs

* Move arrow-optics-mtl docs to arrow-optics-mtl module

* Remove commented tests already moved to correspondent module

* Remove incubator modules from arrow-docs

* Remove examples making use of incubator modules

* Remove macros
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.

2 participants