{"action":"created","comment":{"url":"https://api.github.com/repos/typelevel/cats/pulls/comments/66888803","id":66888803,"diff_hunk":"@@ -0,0 +1,159 @@\n+package cats\n+package data\n+\n+import cats.std.list._\n+//it needs a Functor\n+//it needs semigroup - combine, filter\n+\n+/**\n+ *  A data type which represents a single element (head) and some other\n+ * structure (tail).\n+ */\n+final case class NonEmptyList[A](head: A, tail: List[A] = List[A]()) {\n+\n+  /**\n+   * Return the head and tail into a single list\n+   */\n+  def toList: List[A] = head :: tail\n+\n+  /**\n+   * remove elements not matching the predicate\n+   */\n+  def filter(p: A => Boolean): List[A] = {\n+    val rest = tail.filter(p)\n+    if (p(head)) head :: rest else rest","path":"core/src/main/scala/cats/data/NonEmptyList.scala","position":null,"original_position":24,"commit_id":"4acdc86925b404a6816f0faf1a894844a3ef4fdb","original_commit_id":"1c2adb17dc5dc23b973654c68db964a54daf0460","user":{"login":"non","id":218045,"avatar_url":"https://avatars.githubusercontent.com/u/218045?v=3","gravatar_id":"","url":"https://api.github.com/users/non","html_url":"https://github.com/non","followers_url":"https://api.github.com/users/non/followers","following_url":"https://api.github.com/users/non/following{/other_user}","gists_url":"https://api.github.com/users/non/gists{/gist_id}","starred_url":"https://api.github.com/users/non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/non/subscriptions","organizations_url":"https://api.github.com/users/non/orgs","repos_url":"https://api.github.com/users/non/repos","events_url":"https://api.github.com/users/non/events{/privacy}","received_events_url":"https://api.github.com/users/non/received_events","type":"User","site_admin":false},"body":"I actually prefer being explicit and not creating a list when not necessary. I'll leave it to @WarFox to decide which way to go.","created_at":"2016-06-13T23:49:47Z","updated_at":"2016-06-13T23:49:47Z","html_url":"https://github.com/typelevel/cats/pull/1120#discussion_r66888803","pull_request_url":"https://api.github.com/repos/typelevel/cats/pulls/1120","_links":{"self":{"href":"https://api.github.com/repos/typelevel/cats/pulls/comments/66888803"},"html":{"href":"https://github.com/typelevel/cats/pull/1120#discussion_r66888803"},"pull_request":{"href":"https://api.github.com/repos/typelevel/cats/pulls/1120"}}},"pull_request":{"url":"https://api.github.com/repos/typelevel/cats/pulls/1120","id":73509384,"html_url":"https://github.com/typelevel/cats/pull/1120","diff_url":"https://github.com/typelevel/cats/pull/1120.diff","patch_url":"https://github.com/typelevel/cats/pull/1120.patch","issue_url":"https://api.github.com/repos/typelevel/cats/issues/1120","number":1120,"state":"open","locked":false,"title":"NonEmptyList work in progress [do-not-merge-yet]","user":{"login":"WarFox","id":186013,"avatar_url":"https://avatars.githubusercontent.com/u/186013?v=3","gravatar_id":"","url":"https://api.github.com/users/WarFox","html_url":"https://github.com/WarFox","followers_url":"https://api.github.com/users/WarFox/followers","following_url":"https://api.github.com/users/WarFox/following{/other_user}","gists_url":"https://api.github.com/users/WarFox/gists{/gist_id}","starred_url":"https://api.github.com/users/WarFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarFox/subscriptions","organizations_url":"https://api.github.com/users/WarFox/orgs","repos_url":"https://api.github.com/users/WarFox/repos","events_url":"https://api.github.com/users/WarFox/events{/privacy}","received_events_url":"https://api.github.com/users/WarFox/received_events","type":"User","site_admin":false},"body":"This is a work in progress branch for #1087 created during Hack the tower meet up in London on Saturday, 11 June 2016.\r\n","created_at":"2016-06-12T22:28:27Z","updated_at":"2016-06-13T23:49:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c832ba30782e3a28c99379c891e286d72b38b8fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/typelevel/cats/pulls/1120/commits","review_comments_url":"https://api.github.com/repos/typelevel/cats/pulls/1120/comments","review_comment_url":"https://api.github.com/repos/typelevel/cats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/typelevel/cats/issues/1120/comments","statuses_url":"https://api.github.com/repos/typelevel/cats/statuses/4acdc86925b404a6816f0faf1a894844a3ef4fdb","head":{"label":"WarFox:feature/1087-create-cats-data-nonemptylist","ref":"feature/1087-create-cats-data-nonemptylist","sha":"4acdc86925b404a6816f0faf1a894844a3ef4fdb","user":{"login":"WarFox","id":186013,"avatar_url":"https://avatars.githubusercontent.com/u/186013?v=3","gravatar_id":"","url":"https://api.github.com/users/WarFox","html_url":"https://github.com/WarFox","followers_url":"https://api.github.com/users/WarFox/followers","following_url":"https://api.github.com/users/WarFox/following{/other_user}","gists_url":"https://api.github.com/users/WarFox/gists{/gist_id}","starred_url":"https://api.github.com/users/WarFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarFox/subscriptions","organizations_url":"https://api.github.com/users/WarFox/orgs","repos_url":"https://api.github.com/users/WarFox/repos","events_url":"https://api.github.com/users/WarFox/events{/privacy}","received_events_url":"https://api.github.com/users/WarFox/received_events","type":"User","site_admin":false},"repo":{"id":60903551,"name":"cats","full_name":"WarFox/cats","owner":{"login":"WarFox","id":186013,"avatar_url":"https://avatars.githubusercontent.com/u/186013?v=3","gravatar_id":"","url":"https://api.github.com/users/WarFox","html_url":"https://github.com/WarFox","followers_url":"https://api.github.com/users/WarFox/followers","following_url":"https://api.github.com/users/WarFox/following{/other_user}","gists_url":"https://api.github.com/users/WarFox/gists{/gist_id}","starred_url":"https://api.github.com/users/WarFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarFox/subscriptions","organizations_url":"https://api.github.com/users/WarFox/orgs","repos_url":"https://api.github.com/users/WarFox/repos","events_url":"https://api.github.com/users/WarFox/events{/privacy}","received_events_url":"https://api.github.com/users/WarFox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WarFox/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":true,"url":"https://api.github.com/repos/WarFox/cats","forks_url":"https://api.github.com/repos/WarFox/cats/forks","keys_url":"https://api.github.com/repos/WarFox/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WarFox/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WarFox/cats/teams","hooks_url":"https://api.github.com/repos/WarFox/cats/hooks","issue_events_url":"https://api.github.com/repos/WarFox/cats/issues/events{/number}","events_url":"https://api.github.com/repos/WarFox/cats/events","assignees_url":"https://api.github.com/repos/WarFox/cats/assignees{/user}","branches_url":"https://api.github.com/repos/WarFox/cats/branches{/branch}","tags_url":"https://api.github.com/repos/WarFox/cats/tags","blobs_url":"https://api.github.com/repos/WarFox/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WarFox/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WarFox/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/WarFox/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WarFox/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/WarFox/cats/languages","stargazers_url":"https://api.github.com/repos/WarFox/cats/stargazers","contributors_url":"https://api.github.com/repos/WarFox/cats/contributors","subscribers_url":"https://api.github.com/repos/WarFox/cats/subscribers","subscription_url":"https://api.github.com/repos/WarFox/cats/subscription","commits_url":"https://api.github.com/repos/WarFox/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/WarFox/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/WarFox/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/WarFox/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/WarFox/cats/contents/{+path}","compare_url":"https://api.github.com/repos/WarFox/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WarFox/cats/merges","archive_url":"https://api.github.com/repos/WarFox/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WarFox/cats/downloads","issues_url":"https://api.github.com/repos/WarFox/cats/issues{/number}","pulls_url":"https://api.github.com/repos/WarFox/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/WarFox/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/WarFox/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WarFox/cats/labels{/name}","releases_url":"https://api.github.com/repos/WarFox/cats/releases{/id}","deployments_url":"https://api.github.com/repos/WarFox/cats/deployments","created_at":"2016-06-11T11:12:10Z","updated_at":"2016-06-11T11:12:12Z","pushed_at":"2016-06-13T23:23:27Z","git_url":"git://github.com/WarFox/cats.git","ssh_url":"git@github.com:WarFox/cats.git","clone_url":"https://github.com/WarFox/cats.git","svn_url":"https://github.com/WarFox/cats","homepage":"http://typelevel.org/cats/","size":10102,"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":"f592db84facd88d51d3f64e0e309f320878b8c52","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-06-13T23:32:05Z","pushed_at":"2016-06-13T23:23:28Z","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":11757,"stargazers_count":1087,"watchers_count":1087,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":250,"mirror_url":null,"open_issues_count":152,"forks":250,"open_issues":152,"watchers":1087,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/typelevel/cats/pulls/1120"},"html":{"href":"https://github.com/typelevel/cats/pull/1120"},"issue":{"href":"https://api.github.com/repos/typelevel/cats/issues/1120"},"comments":{"href":"https://api.github.com/repos/typelevel/cats/issues/1120/comments"},"review_comments":{"href":"https://api.github.com/repos/typelevel/cats/pulls/1120/comments"},"review_comment":{"href":"https://api.github.com/repos/typelevel/cats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/typelevel/cats/pulls/1120/commits"},"statuses":{"href":"https://api.github.com/repos/typelevel/cats/statuses/4acdc86925b404a6816f0faf1a894844a3ef4fdb"}}}}
{"actor":{"display_login":"non"}}