{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/211945271","pull_request_review_id":148443714,"id":211945271,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTk0NTI3MQ==","diff_hunk":"@@ -568,30 +565,30 @@ const pattern = win.map(w => w.myAppConfig.templates('greeting'));\n // ￩ Effect('Pleased to meet you, {name}');\n ```\n \n-We’ve got a template function. It takes a string and an object, and returns a string. But our string and object (`name` and `pattern`) are wrapped up in Effects. What we want to do is _lift_ our `tpl()` function up into a higher plane so that it works with Effects.\n+我们已经有一个模板函数了。它接收一个字符串和一个对象并且返回一个字符串。但是我们的字符串和对象（`name` 和 `pattern`）已经包装到 Effect 里了。我们所要做的就是提升我们 `tpl()` 函数到更高的地方使得它能很好地与 Effect 工作。\n \n-Let’s start out by seeing what happens if we call `map()` with `tpl()` on our pattern Effect:\n+让我们看一下如果我们在 pattern Effect 上用 `map()` 调用 `tpl()` 会发生什么：\n \n-```\n+```js\n pattern.map(tpl);\n // ￩ Effect([Function])\n ```\n \n-Looking at the types might make things a little clearer. The type signature for map is something like this:\n+对照一下类型可能会使得事情更加清晰一点。map 的类型签名可能长这样：\n \n     _map :: Effect a ~> (a -> b) -> Effect b_\n \n-And our template function has the signature:\n+模板函数是这样的签名：","path":"TODO1/how-to-deal-with-dirty-side-effects-in-your-pure-functional-javascript.md","position":799,"original_position":799,"commit_id":"b0cf22f3c88297a89bfddbe660152700afcd0010","original_commit_id":"55fc749a6dee3e68ba537f5bcda35c6232bd1d50","user":{"login":"AceLeeWinnie","id":12068841,"node_id":"MDQ6VXNlcjEyMDY4ODQx","avatar_url":"https://avatars0.githubusercontent.com/u/12068841?v=4","gravatar_id":"","url":"https://api.github.com/users/AceLeeWinnie","html_url":"https://github.com/AceLeeWinnie","followers_url":"https://api.github.com/users/AceLeeWinnie/followers","following_url":"https://api.github.com/users/AceLeeWinnie/following{/other_user}","gists_url":"https://api.github.com/users/AceLeeWinnie/gists{/gist_id}","starred_url":"https://api.github.com/users/AceLeeWinnie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AceLeeWinnie/subscriptions","organizations_url":"https://api.github.com/users/AceLeeWinnie/orgs","repos_url":"https://api.github.com/users/AceLeeWinnie/repos","events_url":"https://api.github.com/users/AceLeeWinnie/events{/privacy}","received_events_url":"https://api.github.com/users/AceLeeWinnie/received_events","type":"User","site_admin":false},"body":"1. 模板函数是这样的签名： => 这是模板函数的函数声明：","created_at":"2018-08-22T13:03:23Z","updated_at":"2018-08-22T13:17:22Z","html_url":"https://github.com/xitu/gold-miner/pull/4333#discussion_r211945271","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/4333","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/211945271"},"html":{"href":"https://github.com/xitu/gold-miner/pull/4333#discussion_r211945271"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/4333"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/4333","id":209322484,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MzIyNDg0","html_url":"https://github.com/xitu/gold-miner/pull/4333","diff_url":"https://github.com/xitu/gold-miner/pull/4333.diff","patch_url":"https://github.com/xitu/gold-miner/pull/4333.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/4333","number":4333,"state":"open","locked":false,"title":"如何使用纯函数式 JavaScript 处理脏副作用","user":{"login":"Gavin-Gong","id":9414378,"node_id":"MDQ6VXNlcjk0MTQzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/9414378?v=4","gravatar_id":"","url":"https://api.github.com/users/Gavin-Gong","html_url":"https://github.com/Gavin-Gong","followers_url":"https://api.github.com/users/Gavin-Gong/followers","following_url":"https://api.github.com/users/Gavin-Gong/following{/other_user}","gists_url":"https://api.github.com/users/Gavin-Gong/gists{/gist_id}","starred_url":"https://api.github.com/users/Gavin-Gong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gavin-Gong/subscriptions","organizations_url":"https://api.github.com/users/Gavin-Gong/orgs","repos_url":"https://api.github.com/users/Gavin-Gong/repos","events_url":"https://api.github.com/users/Gavin-Gong/events{/privacy}","received_events_url":"https://api.github.com/users/Gavin-Gong/received_events","type":"User","site_admin":false},"body":"译文翻译完成，resolve #4288\r\n","created_at":"2018-08-18T17:36:41Z","updated_at":"2018-08-22T13:17:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5fd6b1f4ce28ec3486c0a1dcff8a8a5187fecb1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":620756797,"node_id":"MDU6TGFiZWw2MjA3NTY3OTc=","url":"https://api.github.com/repos/xitu/gold-miner/labels/enhancement","name":"enhancement","color":"1d76db","default":true},{"id":514335594,"node_id":"MDU6TGFiZWw1MTQzMzU1OTQ=","url":"https://api.github.com/repos/xitu/gold-miner/labels/%E5%89%8D%E7%AB%AF","name":"前端","color":"1d76db","default":false},{"id":322084033,"node_id":"MDU6TGFiZWwzMjIwODQwMzM=","url":"https://api.github.com/repos/xitu/gold-miner/labels/%E6%AD%A3%E5%9C%A8%E6%A0%A1%E5%AF%B9","name":"正在校对","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/4333/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/4333/comments","review_comment_url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/gold-miner/issues/4333/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/b0cf22f3c88297a89bfddbe660152700afcd0010","head":{"label":"Gavin-Gong:master","ref":"master","sha":"b0cf22f3c88297a89bfddbe660152700afcd0010","user":{"login":"Gavin-Gong","id":9414378,"node_id":"MDQ6VXNlcjk0MTQzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/9414378?v=4","gravatar_id":"","url":"https://api.github.com/users/Gavin-Gong","html_url":"https://github.com/Gavin-Gong","followers_url":"https://api.github.com/users/Gavin-Gong/followers","following_url":"https://api.github.com/users/Gavin-Gong/following{/other_user}","gists_url":"https://api.github.com/users/Gavin-Gong/gists{/gist_id}","starred_url":"https://api.github.com/users/Gavin-Gong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gavin-Gong/subscriptions","organizations_url":"https://api.github.com/users/Gavin-Gong/orgs","repos_url":"https://api.github.com/users/Gavin-Gong/repos","events_url":"https://api.github.com/users/Gavin-Gong/events{/privacy}","received_events_url":"https://api.github.com/users/Gavin-Gong/received_events","type":"User","site_admin":false},"repo":{"id":144259655,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQyNTk2NTU=","name":"gold-miner","full_name":"Gavin-Gong/gold-miner","owner":{"login":"Gavin-Gong","id":9414378,"node_id":"MDQ6VXNlcjk0MTQzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/9414378?v=4","gravatar_id":"","url":"https://api.github.com/users/Gavin-Gong","html_url":"https://github.com/Gavin-Gong","followers_url":"https://api.github.com/users/Gavin-Gong/followers","following_url":"https://api.github.com/users/Gavin-Gong/following{/other_user}","gists_url":"https://api.github.com/users/Gavin-Gong/gists{/gist_id}","starred_url":"https://api.github.com/users/Gavin-Gong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gavin-Gong/subscriptions","organizations_url":"https://api.github.com/users/Gavin-Gong/orgs","repos_url":"https://api.github.com/users/Gavin-Gong/repos","events_url":"https://api.github.com/users/Gavin-Gong/events{/privacy}","received_events_url":"https://api.github.com/users/Gavin-Gong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gavin-Gong/gold-miner","description":"🥇掘金翻译计划，可能是世界最大最好的英译中技术社区，最懂读者和译者的翻译平台：","fork":true,"url":"https://api.github.com/repos/Gavin-Gong/gold-miner","forks_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/forks","keys_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/teams","hooks_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/events","assignees_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/tags","blobs_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/languages","stargazers_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/subscription","commits_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/merges","archive_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/downloads","issues_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/Gavin-Gong/gold-miner/deployments","created_at":"2018-08-10T08:31:04Z","updated_at":"2018-08-22T12:07:58Z","pushed_at":"2018-08-22T12:07:52Z","git_url":"git://github.com/Gavin-Gong/gold-miner.git","ssh_url":"git@github.com:Gavin-Gong/gold-miner.git","clone_url":"https://github.com/Gavin-Gong/gold-miner.git","svn_url":"https://github.com/Gavin-Gong/gold-miner","homepage":"https://juejin.im/tag/掘金翻译计划","size":35129,"stargazers_count":0,"watchers_count":0,"language":null,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xitu:master","ref":"master","sha":"d6657176d0fd73d859bac85bde0af650c93a8ce1","user":{"login":"xitu","id":10482599,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNDgyNTk5","avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":45512989,"node_id":"MDEwOlJlcG9zaXRvcnk0NTUxMjk4OQ==","name":"gold-miner","full_name":"xitu/gold-miner","owner":{"login":"xitu","id":10482599,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNDgyNTk5","avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/gold-miner","description":"🥇掘金翻译计划，可能是世界最大最好的英译中技术社区，最懂读者和译者的翻译平台：","fork":false,"url":"https://api.github.com/repos/xitu/gold-miner","forks_url":"https://api.github.com/repos/xitu/gold-miner/forks","keys_url":"https://api.github.com/repos/xitu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/gold-miner/teams","hooks_url":"https://api.github.com/repos/xitu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/xitu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/gold-miner/events","assignees_url":"https://api.github.com/repos/xitu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/gold-miner/tags","blobs_url":"https://api.github.com/repos/xitu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/xitu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/xitu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/xitu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/xitu/gold-miner/subscription","commits_url":"https://api.github.com/repos/xitu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/gold-miner/merges","archive_url":"https://api.github.com/repos/xitu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/gold-miner/downloads","issues_url":"https://api.github.com/repos/xitu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/xitu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/gold-miner/deployments","created_at":"2015-11-04T03:29:13Z","updated_at":"2018-08-22T13:16:07Z","pushed_at":"2018-08-22T12:07:57Z","git_url":"git://github.com/xitu/gold-miner.git","ssh_url":"git@github.com:xitu/gold-miner.git","clone_url":"https://github.com/xitu/gold-miner.git","svn_url":"https://github.com/xitu/gold-miner","homepage":"https://juejin.im/tag/掘金翻译计划","size":35596,"stargazers_count":15774,"watchers_count":15774,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2728,"mirror_url":null,"archived":false,"open_issues_count":38,"license":null,"forks":2728,"open_issues":38,"watchers":15774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/4333"},"html":{"href":"https://github.com/xitu/gold-miner/pull/4333"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/4333"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/4333/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/4333/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/4333/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/b0cf22f3c88297a89bfddbe660152700afcd0010"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AceLeeWinnie"}}