{"action":"created","comment":{"url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/comments/217927354","pull_request_review_id":155757654,"id":217927354,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzkyNzM1NA==","diff_hunk":"@@ -120,13 +120,13 @@ Argument     | Type                 | Required | Description\n \n Creates a new stream with the results of calling the function on every value in the stream with an accumulator and the incoming value.\n \n-Note that you can prevent dependent streams from being updated by returning the special value `stream.HALT` inside the accumulator function.\n+Note that you can prevent dependent streams from being updated by returning the special value `stream.SKIP` inside the accumulator function.\n \n `stream = Stream.scan(fn, accumulator, stream)`\n \n Argument      | Type                             | Required | Description\n ------------- | -------------------------------- | -------- | ---\n-`fn`          | `(accumulator, value) -> result \\| HALT` | Yes      | A function that takes an accumulator and value parameter and returns a new accumulator value\n+`fn`          | `(accumulator, value) -> result \\| SKIP` | Yes      | A function that takes an accumulator and value parameter and returns a new accumulator value","path":"docs/stream.md","position":21,"original_position":21,"commit_id":"52873d4521c1c6cb400e34457aed9fce80748ffb","original_commit_id":"52873d4521c1c6cb400e34457aed9fce80748ffb","user":{"login":"nordfjord","id":3721521,"node_id":"MDQ6VXNlcjM3MjE1MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/3721521?v=4","gravatar_id":"","url":"https://api.github.com/users/nordfjord","html_url":"https://github.com/nordfjord","followers_url":"https://api.github.com/users/nordfjord/followers","following_url":"https://api.github.com/users/nordfjord/following{/other_user}","gists_url":"https://api.github.com/users/nordfjord/gists{/gist_id}","starred_url":"https://api.github.com/users/nordfjord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nordfjord/subscriptions","organizations_url":"https://api.github.com/users/nordfjord/orgs","repos_url":"https://api.github.com/users/nordfjord/repos","events_url":"https://api.github.com/users/nordfjord/events{/privacy}","received_events_url":"https://api.github.com/users/nordfjord/received_events","type":"User","site_admin":false},"body":"Yeah, I think prose is the correct way to handle this for now","created_at":"2018-09-16T20:49:57Z","updated_at":"2018-09-16T20:49:57Z","html_url":"https://github.com/MithrilJS/mithril.js/pull/2207#discussion_r217927354","pull_request_url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/comments/217927354"},"html":{"href":"https://github.com/MithrilJS/mithril.js/pull/2207#discussion_r217927354"},"pull_request":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207"}},"in_reply_to_id":217915863},"pull_request":{"url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207","id":210340777,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMzQwNzc3","html_url":"https://github.com/MithrilJS/mithril.js/pull/2207","diff_url":"https://github.com/MithrilJS/mithril.js/pull/2207.diff","patch_url":"https://github.com/MithrilJS/mithril.js/pull/2207.patch","issue_url":"https://api.github.com/repos/MithrilJS/mithril.js/issues/2207","number":2207,"state":"open","locked":false,"title":"Rewrite stream","user":{"login":"porsager","id":1288405,"node_id":"MDQ6VXNlcjEyODg0MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1288405?v=4","gravatar_id":"","url":"https://api.github.com/users/porsager","html_url":"https://github.com/porsager","followers_url":"https://api.github.com/users/porsager/followers","following_url":"https://api.github.com/users/porsager/following{/other_user}","gists_url":"https://api.github.com/users/porsager/gists{/gist_id}","starred_url":"https://api.github.com/users/porsager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porsager/subscriptions","organizations_url":"https://api.github.com/users/porsager/orgs","repos_url":"https://api.github.com/users/porsager/repos","events_url":"https://api.github.com/users/porsager/events{/privacy}","received_events_url":"https://api.github.com/users/porsager/received_events","type":"User","site_admin":false},"body":"So after a bit of fiddling trying to solve 2 issues related to mithril streams, I ended up trying to do an implementation from scratch just to get a better understanding of how it all hooked up.\r\n\r\nAfter a bit of back and forth with @pygy on gitter I think I've ended up with a simpler implementation, which at the same time fixes the bugs mentioned above.\r\n\r\nAnother small benefit is that it is 1-3x faster depending on browser for simple tests using map and compose.\r\n\r\nThese are the issues being solved by the rewrite\r\nhttps://github.com/MithrilJS/mithril.js/issues/1714 (PR https://github.com/MithrilJS/mithril.js/pull/2200)\r\nhttps://github.com/MithrilJS/mithril.js/issues/2197 (PR https://github.com/MithrilJS/mithril.js/pull/2201)\r\n\r\nThe first one that got merged actually behaves wrong in that it ends the stream completely (wrong fix)\r\n\r\nThere was also another issue fixed with regards to the changed streams returned in combine which required fixing a test.\r\n\r\nAt the same time I've also renamed HALT to SKIP, which feels a bit more correct relating to its function.\r\n\r\n## How Has This Been Tested?\r\nUsing all current stream tests, correcting 1 test, and adding another\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [x] Documentation change\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [x] My change requires a change to the documentation.\r\n- [x] I have updated the documentation accordingly.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n- [x] I have updated `docs/change-log.md`","created_at":"2018-08-23T06:13:52Z","updated_at":"2018-09-16T20:49:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9d0dcdedbf9fce23ea34875c990dbbbe5ba1aff","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tivac","id":49545,"node_id":"MDQ6VXNlcjQ5NTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/49545?v=4","gravatar_id":"","url":"https://api.github.com/users/tivac","html_url":"https://github.com/tivac","followers_url":"https://api.github.com/users/tivac/followers","following_url":"https://api.github.com/users/tivac/following{/other_user}","gists_url":"https://api.github.com/users/tivac/gists{/gist_id}","starred_url":"https://api.github.com/users/tivac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tivac/subscriptions","organizations_url":"https://api.github.com/users/tivac/orgs","repos_url":"https://api.github.com/users/tivac/repos","events_url":"https://api.github.com/users/tivac/events{/privacy}","received_events_url":"https://api.github.com/users/tivac/received_events","type":"User","site_admin":false},{"login":"pygy","id":54515,"node_id":"MDQ6VXNlcjU0NTE1","avatar_url":"https://avatars1.githubusercontent.com/u/54515?v=4","gravatar_id":"","url":"https://api.github.com/users/pygy","html_url":"https://github.com/pygy","followers_url":"https://api.github.com/users/pygy/followers","following_url":"https://api.github.com/users/pygy/following{/other_user}","gists_url":"https://api.github.com/users/pygy/gists{/gist_id}","starred_url":"https://api.github.com/users/pygy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygy/subscriptions","organizations_url":"https://api.github.com/users/pygy/orgs","repos_url":"https://api.github.com/users/pygy/repos","events_url":"https://api.github.com/users/pygy/events{/privacy}","received_events_url":"https://api.github.com/users/pygy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207/commits","review_comments_url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207/comments","review_comment_url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MithrilJS/mithril.js/issues/2207/comments","statuses_url":"https://api.github.com/repos/MithrilJS/mithril.js/statuses/52873d4521c1c6cb400e34457aed9fce80748ffb","head":{"label":"porsager:streams-rewrite","ref":"streams-rewrite","sha":"52873d4521c1c6cb400e34457aed9fce80748ffb","user":{"login":"porsager","id":1288405,"node_id":"MDQ6VXNlcjEyODg0MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1288405?v=4","gravatar_id":"","url":"https://api.github.com/users/porsager","html_url":"https://github.com/porsager","followers_url":"https://api.github.com/users/porsager/followers","following_url":"https://api.github.com/users/porsager/following{/other_user}","gists_url":"https://api.github.com/users/porsager/gists{/gist_id}","starred_url":"https://api.github.com/users/porsager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porsager/subscriptions","organizations_url":"https://api.github.com/users/porsager/orgs","repos_url":"https://api.github.com/users/porsager/repos","events_url":"https://api.github.com/users/porsager/events{/privacy}","received_events_url":"https://api.github.com/users/porsager/received_events","type":"User","site_admin":false},"repo":{"id":141844666,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4NDQ2NjY=","name":"mithril.js","full_name":"porsager/mithril.js","private":false,"owner":{"login":"porsager","id":1288405,"node_id":"MDQ6VXNlcjEyODg0MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1288405?v=4","gravatar_id":"","url":"https://api.github.com/users/porsager","html_url":"https://github.com/porsager","followers_url":"https://api.github.com/users/porsager/followers","following_url":"https://api.github.com/users/porsager/following{/other_user}","gists_url":"https://api.github.com/users/porsager/gists{/gist_id}","starred_url":"https://api.github.com/users/porsager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porsager/subscriptions","organizations_url":"https://api.github.com/users/porsager/orgs","repos_url":"https://api.github.com/users/porsager/repos","events_url":"https://api.github.com/users/porsager/events{/privacy}","received_events_url":"https://api.github.com/users/porsager/received_events","type":"User","site_admin":false},"html_url":"https://github.com/porsager/mithril.js","description":"A Javascript Framework for Building Brilliant Applications","fork":true,"url":"https://api.github.com/repos/porsager/mithril.js","forks_url":"https://api.github.com/repos/porsager/mithril.js/forks","keys_url":"https://api.github.com/repos/porsager/mithril.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/porsager/mithril.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/porsager/mithril.js/teams","hooks_url":"https://api.github.com/repos/porsager/mithril.js/hooks","issue_events_url":"https://api.github.com/repos/porsager/mithril.js/issues/events{/number}","events_url":"https://api.github.com/repos/porsager/mithril.js/events","assignees_url":"https://api.github.com/repos/porsager/mithril.js/assignees{/user}","branches_url":"https://api.github.com/repos/porsager/mithril.js/branches{/branch}","tags_url":"https://api.github.com/repos/porsager/mithril.js/tags","blobs_url":"https://api.github.com/repos/porsager/mithril.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/porsager/mithril.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/porsager/mithril.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/porsager/mithril.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/porsager/mithril.js/statuses/{sha}","languages_url":"https://api.github.com/repos/porsager/mithril.js/languages","stargazers_url":"https://api.github.com/repos/porsager/mithril.js/stargazers","contributors_url":"https://api.github.com/repos/porsager/mithril.js/contributors","subscribers_url":"https://api.github.com/repos/porsager/mithril.js/subscribers","subscription_url":"https://api.github.com/repos/porsager/mithril.js/subscription","commits_url":"https://api.github.com/repos/porsager/mithril.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/porsager/mithril.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/porsager/mithril.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/porsager/mithril.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/porsager/mithril.js/contents/{+path}","compare_url":"https://api.github.com/repos/porsager/mithril.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/porsager/mithril.js/merges","archive_url":"https://api.github.com/repos/porsager/mithril.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/porsager/mithril.js/downloads","issues_url":"https://api.github.com/repos/porsager/mithril.js/issues{/number}","pulls_url":"https://api.github.com/repos/porsager/mithril.js/pulls{/number}","milestones_url":"https://api.github.com/repos/porsager/mithril.js/milestones{/number}","notifications_url":"https://api.github.com/repos/porsager/mithril.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/porsager/mithril.js/labels{/name}","releases_url":"https://api.github.com/repos/porsager/mithril.js/releases{/id}","deployments_url":"https://api.github.com/repos/porsager/mithril.js/deployments","created_at":"2018-07-21T20:42:22Z","updated_at":"2018-07-21T20:42:25Z","pushed_at":"2018-09-14T12:05:09Z","git_url":"git://github.com/porsager/mithril.js.git","ssh_url":"git@github.com:porsager/mithril.js.git","clone_url":"https://github.com/porsager/mithril.js.git","svn_url":"https://github.com/porsager/mithril.js","homepage":"http://mithril.js.org","size":9269,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"next"}},"base":{"label":"MithrilJS:next","ref":"next","sha":"e62f0f38f63217bf85f358b67fd057f14dfacbe9","user":{"login":"MithrilJS","id":19475707,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDc1NzA3","avatar_url":"https://avatars3.githubusercontent.com/u/19475707?v=4","gravatar_id":"","url":"https://api.github.com/users/MithrilJS","html_url":"https://github.com/MithrilJS","followers_url":"https://api.github.com/users/MithrilJS/followers","following_url":"https://api.github.com/users/MithrilJS/following{/other_user}","gists_url":"https://api.github.com/users/MithrilJS/gists{/gist_id}","starred_url":"https://api.github.com/users/MithrilJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MithrilJS/subscriptions","organizations_url":"https://api.github.com/users/MithrilJS/orgs","repos_url":"https://api.github.com/users/MithrilJS/repos","events_url":"https://api.github.com/users/MithrilJS/events{/privacy}","received_events_url":"https://api.github.com/users/MithrilJS/received_events","type":"Organization","site_admin":false},"repo":{"id":17814354,"node_id":"MDEwOlJlcG9zaXRvcnkxNzgxNDM1NA==","name":"mithril.js","full_name":"MithrilJS/mithril.js","private":false,"owner":{"login":"MithrilJS","id":19475707,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDc1NzA3","avatar_url":"https://avatars3.githubusercontent.com/u/19475707?v=4","gravatar_id":"","url":"https://api.github.com/users/MithrilJS","html_url":"https://github.com/MithrilJS","followers_url":"https://api.github.com/users/MithrilJS/followers","following_url":"https://api.github.com/users/MithrilJS/following{/other_user}","gists_url":"https://api.github.com/users/MithrilJS/gists{/gist_id}","starred_url":"https://api.github.com/users/MithrilJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MithrilJS/subscriptions","organizations_url":"https://api.github.com/users/MithrilJS/orgs","repos_url":"https://api.github.com/users/MithrilJS/repos","events_url":"https://api.github.com/users/MithrilJS/events{/privacy}","received_events_url":"https://api.github.com/users/MithrilJS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/MithrilJS/mithril.js","description":"A Javascript Framework for Building Brilliant Applications","fork":false,"url":"https://api.github.com/repos/MithrilJS/mithril.js","forks_url":"https://api.github.com/repos/MithrilJS/mithril.js/forks","keys_url":"https://api.github.com/repos/MithrilJS/mithril.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MithrilJS/mithril.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MithrilJS/mithril.js/teams","hooks_url":"https://api.github.com/repos/MithrilJS/mithril.js/hooks","issue_events_url":"https://api.github.com/repos/MithrilJS/mithril.js/issues/events{/number}","events_url":"https://api.github.com/repos/MithrilJS/mithril.js/events","assignees_url":"https://api.github.com/repos/MithrilJS/mithril.js/assignees{/user}","branches_url":"https://api.github.com/repos/MithrilJS/mithril.js/branches{/branch}","tags_url":"https://api.github.com/repos/MithrilJS/mithril.js/tags","blobs_url":"https://api.github.com/repos/MithrilJS/mithril.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MithrilJS/mithril.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MithrilJS/mithril.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/MithrilJS/mithril.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MithrilJS/mithril.js/statuses/{sha}","languages_url":"https://api.github.com/repos/MithrilJS/mithril.js/languages","stargazers_url":"https://api.github.com/repos/MithrilJS/mithril.js/stargazers","contributors_url":"https://api.github.com/repos/MithrilJS/mithril.js/contributors","subscribers_url":"https://api.github.com/repos/MithrilJS/mithril.js/subscribers","subscription_url":"https://api.github.com/repos/MithrilJS/mithril.js/subscription","commits_url":"https://api.github.com/repos/MithrilJS/mithril.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/MithrilJS/mithril.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/MithrilJS/mithril.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/MithrilJS/mithril.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/MithrilJS/mithril.js/contents/{+path}","compare_url":"https://api.github.com/repos/MithrilJS/mithril.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MithrilJS/mithril.js/merges","archive_url":"https://api.github.com/repos/MithrilJS/mithril.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MithrilJS/mithril.js/downloads","issues_url":"https://api.github.com/repos/MithrilJS/mithril.js/issues{/number}","pulls_url":"https://api.github.com/repos/MithrilJS/mithril.js/pulls{/number}","milestones_url":"https://api.github.com/repos/MithrilJS/mithril.js/milestones{/number}","notifications_url":"https://api.github.com/repos/MithrilJS/mithril.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MithrilJS/mithril.js/labels{/name}","releases_url":"https://api.github.com/repos/MithrilJS/mithril.js/releases{/id}","deployments_url":"https://api.github.com/repos/MithrilJS/mithril.js/deployments","created_at":"2014-03-17T01:59:39Z","updated_at":"2018-09-16T18:52:30Z","pushed_at":"2018-09-14T12:05:11Z","git_url":"git://github.com/MithrilJS/mithril.js.git","ssh_url":"git@github.com:MithrilJS/mithril.js.git","clone_url":"https://github.com/MithrilJS/mithril.js.git","svn_url":"https://github.com/MithrilJS/mithril.js","homepage":"http://mithril.js.org","size":9233,"stargazers_count":9476,"watchers_count":9476,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":705,"mirror_url":null,"archived":false,"open_issues_count":152,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":705,"open_issues":152,"watchers":9476,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207"},"html":{"href":"https://github.com/MithrilJS/mithril.js/pull/2207"},"issue":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/issues/2207"},"comments":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/issues/2207/comments"},"review_comments":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207/comments"},"review_comment":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/pulls/2207/commits"},"statuses":{"href":"https://api.github.com/repos/MithrilJS/mithril.js/statuses/52873d4521c1c6cb400e34457aed9fce80748ffb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nordfjord"}}