{"action":"closed","number":136,"pull_request":{"url":"https://api.github.com/repos/funcool/cats/pulls/136","id":54428777,"html_url":"https://github.com/funcool/cats/pull/136","diff_url":"https://github.com/funcool/cats/pull/136.diff","patch_url":"https://github.com/funcool/cats/pull/136.patch","issue_url":"https://api.github.com/repos/funcool/cats/issues/136","number":136,"state":"closed","locked":false,"title":"rewrite cats.labs.channel for better semantics","user":{"login":"yanatan16","id":938655,"avatar_url":"https://avatars.githubusercontent.com/u/938655?v=3","gravatar_id":"","url":"https://api.github.com/users/yanatan16","html_url":"https://github.com/yanatan16","followers_url":"https://api.github.com/users/yanatan16/followers","following_url":"https://api.github.com/users/yanatan16/following{/other_user}","gists_url":"https://api.github.com/users/yanatan16/gists{/gist_id}","starred_url":"https://api.github.com/users/yanatan16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanatan16/subscriptions","organizations_url":"https://api.github.com/users/yanatan16/orgs","repos_url":"https://api.github.com/users/yanatan16/repos","events_url":"https://api.github.com/users/yanatan16/events{/privacy}","received_events_url":"https://api.github.com/users/yanatan16/received_events","type":"User","site_admin":false},"body":"- bind improvements:\r\n  - handles bind with function returning an empty channel\r\n  - handles bind with function returning channel with multiple values (allowing comprehension)\r\n  - now uses `a/pipeline-async` to ensure closed correctly\r\n- simplifies mempty, mzero, mreturn, and mpure using `a/to-chan`\r\n- mreturn and mplus check for `nil` values and instead put `:cats.labs.channel/nil` on the channel. An empty channel will end computation, and nil values aren't allowed. Generally the `(return nil)` should only be used when the value is thrown away anyway (such as with `guard`).\r\n- mappend/mplus:\r\n  - simplified using `a/merge`\r\n  - **Behavior Change**: mappend and mplus now merge channels out of order. I believe this is correct because channels represent streams of data, and ordered merge is not necessarily what is desired all the time. For instance, infinite streams should be able to be mappended, and they could not in the previous code\r\n- Adds MonadZero implementation, allowing mlet `:when` form\r\n\r\nPasses all tests. Adds tests that fail under current code:\r\n\r\n- `channel-with-empty`: does a bind where the function returns an empty channel. This causes a \"cannot put nil on channel\" error currently due to `(a/>! c (a/<! result))` statement.\r\n- `channel-comprehension`: does a bind where the values multiply. Current code only allows one value per channel returned by bound function, new code allows many values which allows comprehension.\r\n- `semigroup-tests`: Adjusted to use sets to compare with `mappend` due to behavior change\r\n- `monadzero-tests`: Test mzero\r\n- `monadplus-tests`: Test mplus and mzero laws\r\n- `channel-mlet-when`: Test use of `:when` for in mlet","created_at":"2015-12-22T23:58:31Z","updated_at":"2015-12-23T13:23:49Z","closed_at":"2015-12-23T13:23:48Z","merged_at":"2015-12-23T13:23:48Z","merge_commit_sha":"2b7796ae1a1d452971e92b1546db99d0ea20f635","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/funcool/cats/pulls/136/commits","review_comments_url":"https://api.github.com/repos/funcool/cats/pulls/136/comments","review_comment_url":"https://api.github.com/repos/funcool/cats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/funcool/cats/issues/136/comments","statuses_url":"https://api.github.com/repos/funcool/cats/statuses/a4005de6eed28ba513d65ba028b3df18b68ec7f5","head":{"label":"yanatan16:patch-channels","ref":"patch-channels","sha":"a4005de6eed28ba513d65ba028b3df18b68ec7f5","user":{"login":"yanatan16","id":938655,"avatar_url":"https://avatars.githubusercontent.com/u/938655?v=3","gravatar_id":"","url":"https://api.github.com/users/yanatan16","html_url":"https://github.com/yanatan16","followers_url":"https://api.github.com/users/yanatan16/followers","following_url":"https://api.github.com/users/yanatan16/following{/other_user}","gists_url":"https://api.github.com/users/yanatan16/gists{/gist_id}","starred_url":"https://api.github.com/users/yanatan16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanatan16/subscriptions","organizations_url":"https://api.github.com/users/yanatan16/orgs","repos_url":"https://api.github.com/users/yanatan16/repos","events_url":"https://api.github.com/users/yanatan16/events{/privacy}","received_events_url":"https://api.github.com/users/yanatan16/received_events","type":"User","site_admin":false},"repo":{"id":48457618,"name":"cats","full_name":"yanatan16/cats","owner":{"login":"yanatan16","id":938655,"avatar_url":"https://avatars.githubusercontent.com/u/938655?v=3","gravatar_id":"","url":"https://api.github.com/users/yanatan16","html_url":"https://github.com/yanatan16","followers_url":"https://api.github.com/users/yanatan16/followers","following_url":"https://api.github.com/users/yanatan16/following{/other_user}","gists_url":"https://api.github.com/users/yanatan16/gists{/gist_id}","starred_url":"https://api.github.com/users/yanatan16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanatan16/subscriptions","organizations_url":"https://api.github.com/users/yanatan16/orgs","repos_url":"https://api.github.com/users/yanatan16/repos","events_url":"https://api.github.com/users/yanatan16/events{/privacy}","received_events_url":"https://api.github.com/users/yanatan16/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yanatan16/cats","description":"Category Theory and Algebraic abstractions for Clojure and ClojureScript.","fork":true,"url":"https://api.github.com/repos/yanatan16/cats","forks_url":"https://api.github.com/repos/yanatan16/cats/forks","keys_url":"https://api.github.com/repos/yanatan16/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yanatan16/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yanatan16/cats/teams","hooks_url":"https://api.github.com/repos/yanatan16/cats/hooks","issue_events_url":"https://api.github.com/repos/yanatan16/cats/issues/events{/number}","events_url":"https://api.github.com/repos/yanatan16/cats/events","assignees_url":"https://api.github.com/repos/yanatan16/cats/assignees{/user}","branches_url":"https://api.github.com/repos/yanatan16/cats/branches{/branch}","tags_url":"https://api.github.com/repos/yanatan16/cats/tags","blobs_url":"https://api.github.com/repos/yanatan16/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yanatan16/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yanatan16/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/yanatan16/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yanatan16/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/yanatan16/cats/languages","stargazers_url":"https://api.github.com/repos/yanatan16/cats/stargazers","contributors_url":"https://api.github.com/repos/yanatan16/cats/contributors","subscribers_url":"https://api.github.com/repos/yanatan16/cats/subscribers","subscription_url":"https://api.github.com/repos/yanatan16/cats/subscription","commits_url":"https://api.github.com/repos/yanatan16/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/yanatan16/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/yanatan16/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/yanatan16/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/yanatan16/cats/contents/{+path}","compare_url":"https://api.github.com/repos/yanatan16/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yanatan16/cats/merges","archive_url":"https://api.github.com/repos/yanatan16/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yanatan16/cats/downloads","issues_url":"https://api.github.com/repos/yanatan16/cats/issues{/number}","pulls_url":"https://api.github.com/repos/yanatan16/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/yanatan16/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/yanatan16/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yanatan16/cats/labels{/name}","releases_url":"https://api.github.com/repos/yanatan16/cats/releases{/id}","created_at":"2015-12-22T22:46:52Z","updated_at":"2015-12-22T22:46:54Z","pushed_at":"2015-12-23T07:06:42Z","git_url":"git://github.com/yanatan16/cats.git","ssh_url":"git@github.com:yanatan16/cats.git","clone_url":"https://github.com/yanatan16/cats.git","svn_url":"https://github.com/yanatan16/cats","homepage":"http://funcool.github.io/cats/latest/","size":1338,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"funcool:master","ref":"master","sha":"391ac14e52af564760419f7916315663c7ac2e76","user":{"login":"funcool","id":10117366,"avatar_url":"https://avatars.githubusercontent.com/u/10117366?v=3","gravatar_id":"","url":"https://api.github.com/users/funcool","html_url":"https://github.com/funcool","followers_url":"https://api.github.com/users/funcool/followers","following_url":"https://api.github.com/users/funcool/following{/other_user}","gists_url":"https://api.github.com/users/funcool/gists{/gist_id}","starred_url":"https://api.github.com/users/funcool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funcool/subscriptions","organizations_url":"https://api.github.com/users/funcool/orgs","repos_url":"https://api.github.com/users/funcool/repos","events_url":"https://api.github.com/users/funcool/events{/privacy}","received_events_url":"https://api.github.com/users/funcool/received_events","type":"Organization","site_admin":false},"repo":{"id":20815029,"name":"cats","full_name":"funcool/cats","owner":{"login":"funcool","id":10117366,"avatar_url":"https://avatars.githubusercontent.com/u/10117366?v=3","gravatar_id":"","url":"https://api.github.com/users/funcool","html_url":"https://github.com/funcool","followers_url":"https://api.github.com/users/funcool/followers","following_url":"https://api.github.com/users/funcool/following{/other_user}","gists_url":"https://api.github.com/users/funcool/gists{/gist_id}","starred_url":"https://api.github.com/users/funcool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funcool/subscriptions","organizations_url":"https://api.github.com/users/funcool/orgs","repos_url":"https://api.github.com/users/funcool/repos","events_url":"https://api.github.com/users/funcool/events{/privacy}","received_events_url":"https://api.github.com/users/funcool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/funcool/cats","description":"Category Theory and Algebraic abstractions for Clojure and ClojureScript.","fork":false,"url":"https://api.github.com/repos/funcool/cats","forks_url":"https://api.github.com/repos/funcool/cats/forks","keys_url":"https://api.github.com/repos/funcool/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/funcool/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/funcool/cats/teams","hooks_url":"https://api.github.com/repos/funcool/cats/hooks","issue_events_url":"https://api.github.com/repos/funcool/cats/issues/events{/number}","events_url":"https://api.github.com/repos/funcool/cats/events","assignees_url":"https://api.github.com/repos/funcool/cats/assignees{/user}","branches_url":"https://api.github.com/repos/funcool/cats/branches{/branch}","tags_url":"https://api.github.com/repos/funcool/cats/tags","blobs_url":"https://api.github.com/repos/funcool/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/funcool/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/funcool/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/funcool/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/funcool/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/funcool/cats/languages","stargazers_url":"https://api.github.com/repos/funcool/cats/stargazers","contributors_url":"https://api.github.com/repos/funcool/cats/contributors","subscribers_url":"https://api.github.com/repos/funcool/cats/subscribers","subscription_url":"https://api.github.com/repos/funcool/cats/subscription","commits_url":"https://api.github.com/repos/funcool/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/funcool/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/funcool/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/funcool/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/funcool/cats/contents/{+path}","compare_url":"https://api.github.com/repos/funcool/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/funcool/cats/merges","archive_url":"https://api.github.com/repos/funcool/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/funcool/cats/downloads","issues_url":"https://api.github.com/repos/funcool/cats/issues{/number}","pulls_url":"https://api.github.com/repos/funcool/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/funcool/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/funcool/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/funcool/cats/labels{/name}","releases_url":"https://api.github.com/repos/funcool/cats/releases{/id}","created_at":"2014-06-13T19:15:40Z","updated_at":"2015-12-16T12:35:00Z","pushed_at":"2015-12-23T13:23:48Z","git_url":"git://github.com/funcool/cats.git","ssh_url":"git@github.com:funcool/cats.git","clone_url":"https://github.com/funcool/cats.git","svn_url":"https://github.com/funcool/cats","homepage":"http://funcool.github.io/cats/latest/","size":1392,"stargazers_count":317,"watchers_count":317,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":28,"mirror_url":null,"open_issues_count":14,"forks":28,"open_issues":14,"watchers":317,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/funcool/cats/pulls/136"},"html":{"href":"https://github.com/funcool/cats/pull/136"},"issue":{"href":"https://api.github.com/repos/funcool/cats/issues/136"},"comments":{"href":"https://api.github.com/repos/funcool/cats/issues/136/comments"},"review_comments":{"href":"https://api.github.com/repos/funcool/cats/pulls/136/comments"},"review_comment":{"href":"https://api.github.com/repos/funcool/cats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/funcool/cats/pulls/136/commits"},"statuses":{"href":"https://api.github.com/repos/funcool/cats/statuses/a4005de6eed28ba513d65ba028b3df18b68ec7f5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"niwinz","id":843689,"avatar_url":"https://avatars.githubusercontent.com/u/843689?v=3","gravatar_id":"","url":"https://api.github.com/users/niwinz","html_url":"https://github.com/niwinz","followers_url":"https://api.github.com/users/niwinz/followers","following_url":"https://api.github.com/users/niwinz/following{/other_user}","gists_url":"https://api.github.com/users/niwinz/gists{/gist_id}","starred_url":"https://api.github.com/users/niwinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niwinz/subscriptions","organizations_url":"https://api.github.com/users/niwinz/orgs","repos_url":"https://api.github.com/users/niwinz/repos","events_url":"https://api.github.com/users/niwinz/events{/privacy}","received_events_url":"https://api.github.com/users/niwinz/received_events","type":"User","site_admin":false},"comments":1,"review_comments":5,"commits":1,"additions":109,"deletions":53,"changed_files":2}}