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 scaladoc for Comonad / CoFlatMap #131

Closed
stew opened this issue Feb 8, 2015 · 8 comments
Closed

add scaladoc for Comonad / CoFlatMap #131

stew opened this issue Feb 8, 2015 · 8 comments

Comments

@stew
Copy link
Contributor

stew commented Feb 8, 2015

core/src/main/scala/cats/Comonad.scala
core/src/main/scala/cats/CoFlatMap.scaal

@stew stew added the ready label Feb 8, 2015
@lukewyman
Copy link
Contributor

@stew I'd like to work on this one (and have started already). Question on the scaladocs: do we want to make these comments nice and pretty complete with examples (like the comments in cats.Arrow)?

If the answer is yes, then it doesn't look like we have instances (or complete combinators on our instances) for Comonad and CoFlatMap. Should I go ahead and polish this up?

And if the answer to that is yes, how on earth does one extract `A

@lukewyman
Copy link
Contributor

And if the answer to that is yes, how on earth does one extract A from None without knowing what `A

@lukewyman
Copy link
Contributor

without knowing what A is?

@adelbertc
Copy link
Contributor

We have a couple instances for Comonad, see Id and Eval. Id is defined as type Id[A] = A so extraction is identity. Eval is a data type that captures evaluation strategy of a value, extracting is equivalent to executing the strategy to compute the value.

re: Scaladoc w/ examples, that would be good. We use sbt-doctest to make sure the examples are compile-able and correct, so you may want to look into that.

@lukewyman
Copy link
Contributor

Do there exist possible implementations for extract on things like 'NoneandList()`, as in is that solvable?

@adelbertc
Copy link
Contributor

Nope, for the reason you stated previously
On Feb 16, 2016 17:45, "Luke Wyman" notifications@github.com wrote:

Do there exist possible implementations for extract on things like 'None
andList()`, as in is that solvable?


Reply to this email directly or view it on GitHub
#131 (comment).

@ceedubs
Copy link
Contributor

ceedubs commented Feb 17, 2016

NonEmptyList is probably a good item for a Comonad example. Other than the fact that it will show up as OneAnd in the toString representation, which could be a bit confusing...

non added a commit that referenced this issue May 30, 2016
@kailuowang
Copy link
Contributor

fixed by #898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants