{"action":"created","comment":{"url":"https://api.github.com/repos/typelevel/cats/pulls/comments/57575653","id":57575653,"diff_hunk":"@@ -2,9 +2,29 @@ package cats\n \n import simulacrum.typeclass\n \n+\n /**\n- * Must obey the laws defined in cats.laws.ComonadLaws.\n- */\n+  * Comonad\n+  *\n+  * Comonad is the dual of Monad. Whereas Monads allow for the composition of effectful functions,\n+  * Comonads allow for composition of functions that extract the value from their context.\n+  *\n+  * Must obey the laws defined in cats.laws.ComonadLaws.\n+  */\n @typeclass trait Comonad[F[_]] extends CoflatMap[F] {\n+\n+  /**\n+    * `extract` is the dual of `pure` on Monad (via `Applicative`)\n+    * and extracts the value from its context\n+    *\n+    * Example:\n+    * {{{\n+    * scala> import cats.Id\n+    * scala> import cats.Comonad\n+    * scala> val id = Id.pure(3)\n+    * scala> Comonad[Id].extract(id)\n+    * res0: cats.Id[Int] = 3","path":"core/src/main/scala/cats/Comonad.scala","position":27,"original_position":27,"commit_id":"f7713d9c5d2e235b7d951b64d449391376db6660","original_commit_id":"f7713d9c5d2e235b7d951b64d449391376db6660","user":{"login":"ceedubs","id":977929,"avatar_url":"https://avatars.githubusercontent.com/u/977929?v=3","gravatar_id":"","url":"https://api.github.com/users/ceedubs","html_url":"https://github.com/ceedubs","followers_url":"https://api.github.com/users/ceedubs/followers","following_url":"https://api.github.com/users/ceedubs/following{/other_user}","gists_url":"https://api.github.com/users/ceedubs/gists{/gist_id}","starred_url":"https://api.github.com/users/ceedubs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceedubs/subscriptions","organizations_url":"https://api.github.com/users/ceedubs/orgs","repos_url":"https://api.github.com/users/ceedubs/repos","events_url":"https://api.github.com/users/ceedubs/events{/privacy}","received_events_url":"https://api.github.com/users/ceedubs/received_events","type":"User","site_admin":false},"body":"This is minor, but could we make this `res0: Int = 3`? I think that would make it a bit more clear that `extract` pulls an `A` out of an `F` context. `Id` is the weird case where `Id[A]` and `A` happen to be the same.","created_at":"2016-03-28T14:17:42Z","updated_at":"2016-03-28T14:17:42Z","html_url":"https://github.com/typelevel/cats/pull/898#discussion_r57575653","pull_request_url":"https://api.github.com/repos/typelevel/cats/pulls/898","_links":{"self":{"href":"https://api.github.com/repos/typelevel/cats/pulls/comments/57575653"},"html":{"href":"https://github.com/typelevel/cats/pull/898#discussion_r57575653"},"pull_request":{"href":"https://api.github.com/repos/typelevel/cats/pulls/898"}}},"pull_request":{"url":"https://api.github.com/repos/typelevel/cats/pulls/898","id":60412493,"html_url":"https://github.com/typelevel/cats/pull/898","diff_url":"https://github.com/typelevel/cats/pull/898.diff","patch_url":"https://github.com/typelevel/cats/pull/898.patch","issue_url":"https://api.github.com/repos/typelevel/cats/issues/898","number":898,"state":"open","locked":false,"title":"Topic/scaladoc coflat comonad #131","user":{"login":"lukewyman","id":6766511,"avatar_url":"https://avatars.githubusercontent.com/u/6766511?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewyman","html_url":"https://github.com/lukewyman","followers_url":"https://api.github.com/users/lukewyman/followers","following_url":"https://api.github.com/users/lukewyman/following{/other_user}","gists_url":"https://api.github.com/users/lukewyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewyman/subscriptions","organizations_url":"https://api.github.com/users/lukewyman/orgs","repos_url":"https://api.github.com/users/lukewyman/repos","events_url":"https://api.github.com/users/lukewyman/events{/privacy}","received_events_url":"https://api.github.com/users/lukewyman/received_events","type":"User","site_admin":false},"body":"Added scaladoc comments with REPL examples.","created_at":"2016-02-23T21:26:15Z","updated_at":"2016-03-28T14:17:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d82b8d2ccefe57a7bc632de8e8912dfb30ae6d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/typelevel/cats/pulls/898/commits","review_comments_url":"https://api.github.com/repos/typelevel/cats/pulls/898/comments","review_comment_url":"https://api.github.com/repos/typelevel/cats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/typelevel/cats/issues/898/comments","statuses_url":"https://api.github.com/repos/typelevel/cats/statuses/f7713d9c5d2e235b7d951b64d449391376db6660","head":{"label":"lukewyman:topic/scaladoc-coflat-comonad","ref":"topic/scaladoc-coflat-comonad","sha":"f7713d9c5d2e235b7d951b64d449391376db6660","user":{"login":"lukewyman","id":6766511,"avatar_url":"https://avatars.githubusercontent.com/u/6766511?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewyman","html_url":"https://github.com/lukewyman","followers_url":"https://api.github.com/users/lukewyman/followers","following_url":"https://api.github.com/users/lukewyman/following{/other_user}","gists_url":"https://api.github.com/users/lukewyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewyman/subscriptions","organizations_url":"https://api.github.com/users/lukewyman/orgs","repos_url":"https://api.github.com/users/lukewyman/repos","events_url":"https://api.github.com/users/lukewyman/events{/privacy}","received_events_url":"https://api.github.com/users/lukewyman/received_events","type":"User","site_admin":false},"repo":{"id":49294834,"name":"cats","full_name":"lukewyman/cats","owner":{"login":"lukewyman","id":6766511,"avatar_url":"https://avatars.githubusercontent.com/u/6766511?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewyman","html_url":"https://github.com/lukewyman","followers_url":"https://api.github.com/users/lukewyman/followers","following_url":"https://api.github.com/users/lukewyman/following{/other_user}","gists_url":"https://api.github.com/users/lukewyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewyman/subscriptions","organizations_url":"https://api.github.com/users/lukewyman/orgs","repos_url":"https://api.github.com/users/lukewyman/repos","events_url":"https://api.github.com/users/lukewyman/events{/privacy}","received_events_url":"https://api.github.com/users/lukewyman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lukewyman/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":true,"url":"https://api.github.com/repos/lukewyman/cats","forks_url":"https://api.github.com/repos/lukewyman/cats/forks","keys_url":"https://api.github.com/repos/lukewyman/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lukewyman/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lukewyman/cats/teams","hooks_url":"https://api.github.com/repos/lukewyman/cats/hooks","issue_events_url":"https://api.github.com/repos/lukewyman/cats/issues/events{/number}","events_url":"https://api.github.com/repos/lukewyman/cats/events","assignees_url":"https://api.github.com/repos/lukewyman/cats/assignees{/user}","branches_url":"https://api.github.com/repos/lukewyman/cats/branches{/branch}","tags_url":"https://api.github.com/repos/lukewyman/cats/tags","blobs_url":"https://api.github.com/repos/lukewyman/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lukewyman/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lukewyman/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/lukewyman/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lukewyman/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/lukewyman/cats/languages","stargazers_url":"https://api.github.com/repos/lukewyman/cats/stargazers","contributors_url":"https://api.github.com/repos/lukewyman/cats/contributors","subscribers_url":"https://api.github.com/repos/lukewyman/cats/subscribers","subscription_url":"https://api.github.com/repos/lukewyman/cats/subscription","commits_url":"https://api.github.com/repos/lukewyman/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/lukewyman/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/lukewyman/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/lukewyman/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/lukewyman/cats/contents/{+path}","compare_url":"https://api.github.com/repos/lukewyman/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lukewyman/cats/merges","archive_url":"https://api.github.com/repos/lukewyman/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lukewyman/cats/downloads","issues_url":"https://api.github.com/repos/lukewyman/cats/issues{/number}","pulls_url":"https://api.github.com/repos/lukewyman/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/lukewyman/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/lukewyman/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lukewyman/cats/labels{/name}","releases_url":"https://api.github.com/repos/lukewyman/cats/releases{/id}","deployments_url":"https://api.github.com/repos/lukewyman/cats/deployments","created_at":"2016-01-08T20:34:31Z","updated_at":"2016-02-18T02:43:06Z","pushed_at":"2016-03-03T02:09:37Z","git_url":"git://github.com/lukewyman/cats.git","ssh_url":"git@github.com:lukewyman/cats.git","clone_url":"https://github.com/lukewyman/cats.git","svn_url":"https://github.com/lukewyman/cats","homepage":"http://non.github.io/cats/","size":7183,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"typelevel:master","ref":"master","sha":"fa20a492b6adae4b87ee9537af371a61147111d0","user":{"login":"typelevel","id":3731824,"avatar_url":"https://avatars.githubusercontent.com/u/3731824?v=3","gravatar_id":"","url":"https://api.github.com/users/typelevel","html_url":"https://github.com/typelevel","followers_url":"https://api.github.com/users/typelevel/followers","following_url":"https://api.github.com/users/typelevel/following{/other_user}","gists_url":"https://api.github.com/users/typelevel/gists{/gist_id}","starred_url":"https://api.github.com/users/typelevel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typelevel/subscriptions","organizations_url":"https://api.github.com/users/typelevel/orgs","repos_url":"https://api.github.com/users/typelevel/repos","events_url":"https://api.github.com/users/typelevel/events{/privacy}","received_events_url":"https://api.github.com/users/typelevel/received_events","type":"Organization","site_admin":false},"repo":{"id":29986727,"name":"cats","full_name":"typelevel/cats","owner":{"login":"typelevel","id":3731824,"avatar_url":"https://avatars.githubusercontent.com/u/3731824?v=3","gravatar_id":"","url":"https://api.github.com/users/typelevel","html_url":"https://github.com/typelevel","followers_url":"https://api.github.com/users/typelevel/followers","following_url":"https://api.github.com/users/typelevel/following{/other_user}","gists_url":"https://api.github.com/users/typelevel/gists{/gist_id}","starred_url":"https://api.github.com/users/typelevel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typelevel/subscriptions","organizations_url":"https://api.github.com/users/typelevel/orgs","repos_url":"https://api.github.com/users/typelevel/repos","events_url":"https://api.github.com/users/typelevel/events{/privacy}","received_events_url":"https://api.github.com/users/typelevel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typelevel/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":false,"url":"https://api.github.com/repos/typelevel/cats","forks_url":"https://api.github.com/repos/typelevel/cats/forks","keys_url":"https://api.github.com/repos/typelevel/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typelevel/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typelevel/cats/teams","hooks_url":"https://api.github.com/repos/typelevel/cats/hooks","issue_events_url":"https://api.github.com/repos/typelevel/cats/issues/events{/number}","events_url":"https://api.github.com/repos/typelevel/cats/events","assignees_url":"https://api.github.com/repos/typelevel/cats/assignees{/user}","branches_url":"https://api.github.com/repos/typelevel/cats/branches{/branch}","tags_url":"https://api.github.com/repos/typelevel/cats/tags","blobs_url":"https://api.github.com/repos/typelevel/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typelevel/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typelevel/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/typelevel/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typelevel/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/typelevel/cats/languages","stargazers_url":"https://api.github.com/repos/typelevel/cats/stargazers","contributors_url":"https://api.github.com/repos/typelevel/cats/contributors","subscribers_url":"https://api.github.com/repos/typelevel/cats/subscribers","subscription_url":"https://api.github.com/repos/typelevel/cats/subscription","commits_url":"https://api.github.com/repos/typelevel/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/typelevel/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/typelevel/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/typelevel/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/typelevel/cats/contents/{+path}","compare_url":"https://api.github.com/repos/typelevel/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typelevel/cats/merges","archive_url":"https://api.github.com/repos/typelevel/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typelevel/cats/downloads","issues_url":"https://api.github.com/repos/typelevel/cats/issues{/number}","pulls_url":"https://api.github.com/repos/typelevel/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/typelevel/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/typelevel/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typelevel/cats/labels{/name}","releases_url":"https://api.github.com/repos/typelevel/cats/releases{/id}","deployments_url":"https://api.github.com/repos/typelevel/cats/deployments","created_at":"2015-01-28T20:26:48Z","updated_at":"2016-03-26T05:37:42Z","pushed_at":"2016-03-28T13:45:02Z","git_url":"git://github.com/typelevel/cats.git","ssh_url":"git@github.com:typelevel/cats.git","clone_url":"https://github.com/typelevel/cats.git","svn_url":"https://github.com/typelevel/cats","homepage":"http://typelevel.org/cats/","size":8982,"stargazers_count":947,"watchers_count":947,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":194,"mirror_url":null,"open_issues_count":151,"forks":194,"open_issues":151,"watchers":947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/typelevel/cats/pulls/898"},"html":{"href":"https://github.com/typelevel/cats/pull/898"},"issue":{"href":"https://api.github.com/repos/typelevel/cats/issues/898"},"comments":{"href":"https://api.github.com/repos/typelevel/cats/issues/898/comments"},"review_comments":{"href":"https://api.github.com/repos/typelevel/cats/pulls/898/comments"},"review_comment":{"href":"https://api.github.com/repos/typelevel/cats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/typelevel/cats/pulls/898/commits"},"statuses":{"href":"https://api.github.com/repos/typelevel/cats/statuses/f7713d9c5d2e235b7d951b64d449391376db6660"}}}}