{"action":"created","comment":{"url":"https://api.github.com/repos/exercism/xpurescript/pulls/comments/105522453","pull_request_review_id":26412463,"id":105522453,"diff_hunk":"@@ -0,0 +1,31 @@\n+module WordCount\n+  ( wordCount\n+  ) where\n+\n+import Prelude\n+import Data.Array (foldl)\n+import Data.Maybe (Maybe(Just), maybe)\n+import Data.StrMap (StrMap, alter, empty)\n+import Data.String (Pattern(..), split, toLower, trim)\n+import Data.String.Regex (replace)\n+import Data.String.Regex.Flags (global)\n+import Data.String.Regex.Unsafe (unsafeRegex)\n+\n+prepare :: String -> Array String\n+prepare = whitePunc\n+          >>> remQuot\n+          >>> aggWhite\n+          >>> trim\n+          >>> toLower\n+          >>> split (Pattern \" \")\n+  where whitePunc = replace (unsafeRegex \"[,\\n:!&@$%^&.]\" global) \" \"\n+        remQuot = replace (unsafeRegex \"'(\\\\w+)'\" global) \"$1\"\n+        aggWhite = replace (unsafeRegex \" +\" global) \" \"\n+\n+freq :: Array String -> StrMap Int\n+freq = foldl mupd empty\n+  where mupd acc word = alter cupd word acc\n+        cupd = maybe 1 ((+) 1) >>> Just\n+\n+wordCount :: String -> StrMap Int\n+wordCount = prepare >>> freq","path":"exercises/word-count/examples/src/WordCount.purs","position":31,"original_position":31,"commit_id":"dce43fc92a07757f6d45a931742043f8961de667","original_commit_id":"c38fab08bb253cca07da62ad7e4cac55f65e62cd","user":{"login":"icyrockcom","id":785140,"avatar_url":"https://avatars3.githubusercontent.com/u/785140?v=3","gravatar_id":"","url":"https://api.github.com/users/icyrockcom","html_url":"https://github.com/icyrockcom","followers_url":"https://api.github.com/users/icyrockcom/followers","following_url":"https://api.github.com/users/icyrockcom/following{/other_user}","gists_url":"https://api.github.com/users/icyrockcom/gists{/gist_id}","starred_url":"https://api.github.com/users/icyrockcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icyrockcom/subscriptions","organizations_url":"https://api.github.com/users/icyrockcom/orgs","repos_url":"https://api.github.com/users/icyrockcom/repos","events_url":"https://api.github.com/users/icyrockcom/events{/privacy}","received_events_url":"https://api.github.com/users/icyrockcom/received_events","type":"User","site_admin":false},"body":"Sure thing Louis, that has been done. https://travis-ci.org/exercism/xpurescript/builds/209958605","created_at":"2017-03-11T02:11:56Z","updated_at":"2017-03-11T02:11:56Z","html_url":"https://github.com/exercism/xpurescript/pull/22#discussion_r105522453","pull_request_url":"https://api.github.com/repos/exercism/xpurescript/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/exercism/xpurescript/pulls/comments/105522453"},"html":{"href":"https://github.com/exercism/xpurescript/pull/22#discussion_r105522453"},"pull_request":{"href":"https://api.github.com/repos/exercism/xpurescript/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/exercism/xpurescript/pulls/22","id":110050432,"html_url":"https://github.com/exercism/xpurescript/pull/22","diff_url":"https://github.com/exercism/xpurescript/pull/22.diff","patch_url":"https://github.com/exercism/xpurescript/pull/22.patch","issue_url":"https://api.github.com/repos/exercism/xpurescript/issues/22","number":22,"state":"open","locked":false,"title":"Add Word Count exercise","user":{"login":"icyrockcom","id":785140,"avatar_url":"https://avatars3.githubusercontent.com/u/785140?v=3","gravatar_id":"","url":"https://api.github.com/users/icyrockcom","html_url":"https://github.com/icyrockcom","followers_url":"https://api.github.com/users/icyrockcom/followers","following_url":"https://api.github.com/users/icyrockcom/following{/other_user}","gists_url":"https://api.github.com/users/icyrockcom/gists{/gist_id}","starred_url":"https://api.github.com/users/icyrockcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icyrockcom/subscriptions","organizations_url":"https://api.github.com/users/icyrockcom/orgs","repos_url":"https://api.github.com/users/icyrockcom/repos","events_url":"https://api.github.com/users/icyrockcom/events{/privacy}","received_events_url":"https://api.github.com/users/icyrockcom/received_events","type":"User","site_admin":false},"body":"I'm new to both Exercism and PureScript - big thanks to all of you for investing so much into these projects!\r\n\r\nIf you have a moment, please let me know if this looks good and if anything needs or is worth changing, especially whether:\r\n\r\n* The code is idiomatic, including any stylistic comments (formatting, verbosity, hard to read, too basic, etc.)\r\n* There are other approaches I should have taken or considered (different types, functions, algorithms, etc.)\r\n* Using non-Prelude packages (`purescript-maps` in this case) is OK\r\n* The pull request is good\r\n\r\nCheers!","created_at":"2017-03-10T02:44:09Z","updated_at":"2017-03-11T02:11:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a6ebbc3a79f666a52103a1eaefa9be9ce799922","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/exercism/xpurescript/pulls/22/commits","review_comments_url":"https://api.github.com/repos/exercism/xpurescript/pulls/22/comments","review_comment_url":"https://api.github.com/repos/exercism/xpurescript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/xpurescript/issues/22/comments","statuses_url":"https://api.github.com/repos/exercism/xpurescript/statuses/dce43fc92a07757f6d45a931742043f8961de667","head":{"label":"icyrockcom:word-count","ref":"word-count","sha":"dce43fc92a07757f6d45a931742043f8961de667","user":{"login":"icyrockcom","id":785140,"avatar_url":"https://avatars3.githubusercontent.com/u/785140?v=3","gravatar_id":"","url":"https://api.github.com/users/icyrockcom","html_url":"https://github.com/icyrockcom","followers_url":"https://api.github.com/users/icyrockcom/followers","following_url":"https://api.github.com/users/icyrockcom/following{/other_user}","gists_url":"https://api.github.com/users/icyrockcom/gists{/gist_id}","starred_url":"https://api.github.com/users/icyrockcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icyrockcom/subscriptions","organizations_url":"https://api.github.com/users/icyrockcom/orgs","repos_url":"https://api.github.com/users/icyrockcom/repos","events_url":"https://api.github.com/users/icyrockcom/events{/privacy}","received_events_url":"https://api.github.com/users/icyrockcom/received_events","type":"User","site_admin":false},"repo":{"id":83939426,"name":"xpurescript","full_name":"icyrockcom/xpurescript","owner":{"login":"icyrockcom","id":785140,"avatar_url":"https://avatars3.githubusercontent.com/u/785140?v=3","gravatar_id":"","url":"https://api.github.com/users/icyrockcom","html_url":"https://github.com/icyrockcom","followers_url":"https://api.github.com/users/icyrockcom/followers","following_url":"https://api.github.com/users/icyrockcom/following{/other_user}","gists_url":"https://api.github.com/users/icyrockcom/gists{/gist_id}","starred_url":"https://api.github.com/users/icyrockcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icyrockcom/subscriptions","organizations_url":"https://api.github.com/users/icyrockcom/orgs","repos_url":"https://api.github.com/users/icyrockcom/repos","events_url":"https://api.github.com/users/icyrockcom/events{/privacy}","received_events_url":"https://api.github.com/users/icyrockcom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/icyrockcom/xpurescript","description":"Exercism exercises in PureScript","fork":true,"url":"https://api.github.com/repos/icyrockcom/xpurescript","forks_url":"https://api.github.com/repos/icyrockcom/xpurescript/forks","keys_url":"https://api.github.com/repos/icyrockcom/xpurescript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icyrockcom/xpurescript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icyrockcom/xpurescript/teams","hooks_url":"https://api.github.com/repos/icyrockcom/xpurescript/hooks","issue_events_url":"https://api.github.com/repos/icyrockcom/xpurescript/issues/events{/number}","events_url":"https://api.github.com/repos/icyrockcom/xpurescript/events","assignees_url":"https://api.github.com/repos/icyrockcom/xpurescript/assignees{/user}","branches_url":"https://api.github.com/repos/icyrockcom/xpurescript/branches{/branch}","tags_url":"https://api.github.com/repos/icyrockcom/xpurescript/tags","blobs_url":"https://api.github.com/repos/icyrockcom/xpurescript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icyrockcom/xpurescript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icyrockcom/xpurescript/git/refs{/sha}","trees_url":"https://api.github.com/repos/icyrockcom/xpurescript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icyrockcom/xpurescript/statuses/{sha}","languages_url":"https://api.github.com/repos/icyrockcom/xpurescript/languages","stargazers_url":"https://api.github.com/repos/icyrockcom/xpurescript/stargazers","contributors_url":"https://api.github.com/repos/icyrockcom/xpurescript/contributors","subscribers_url":"https://api.github.com/repos/icyrockcom/xpurescript/subscribers","subscription_url":"https://api.github.com/repos/icyrockcom/xpurescript/subscription","commits_url":"https://api.github.com/repos/icyrockcom/xpurescript/commits{/sha}","git_commits_url":"https://api.github.com/repos/icyrockcom/xpurescript/git/commits{/sha}","comments_url":"https://api.github.com/repos/icyrockcom/xpurescript/comments{/number}","issue_comment_url":"https://api.github.com/repos/icyrockcom/xpurescript/issues/comments{/number}","contents_url":"https://api.github.com/repos/icyrockcom/xpurescript/contents/{+path}","compare_url":"https://api.github.com/repos/icyrockcom/xpurescript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icyrockcom/xpurescript/merges","archive_url":"https://api.github.com/repos/icyrockcom/xpurescript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icyrockcom/xpurescript/downloads","issues_url":"https://api.github.com/repos/icyrockcom/xpurescript/issues{/number}","pulls_url":"https://api.github.com/repos/icyrockcom/xpurescript/pulls{/number}","milestones_url":"https://api.github.com/repos/icyrockcom/xpurescript/milestones{/number}","notifications_url":"https://api.github.com/repos/icyrockcom/xpurescript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icyrockcom/xpurescript/labels{/name}","releases_url":"https://api.github.com/repos/icyrockcom/xpurescript/releases{/id}","deployments_url":"https://api.github.com/repos/icyrockcom/xpurescript/deployments","created_at":"2017-03-05T02:36:30Z","updated_at":"2017-03-05T02:36:32Z","pushed_at":"2017-03-11T01:07:48Z","git_url":"git://github.com/icyrockcom/xpurescript.git","ssh_url":"git@github.com:icyrockcom/xpurescript.git","clone_url":"https://github.com/icyrockcom/xpurescript.git","svn_url":"https://github.com/icyrockcom/xpurescript","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"PureScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"exercism:master","ref":"master","sha":"a8cec0f03c8f06fc24b36229d3bdba21c25acf66","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars3.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":62670993,"name":"xpurescript","full_name":"exercism/xpurescript","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars3.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/xpurescript","description":"Exercism exercises in PureScript","fork":false,"url":"https://api.github.com/repos/exercism/xpurescript","forks_url":"https://api.github.com/repos/exercism/xpurescript/forks","keys_url":"https://api.github.com/repos/exercism/xpurescript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/xpurescript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/xpurescript/teams","hooks_url":"https://api.github.com/repos/exercism/xpurescript/hooks","issue_events_url":"https://api.github.com/repos/exercism/xpurescript/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/xpurescript/events","assignees_url":"https://api.github.com/repos/exercism/xpurescript/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/xpurescript/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/xpurescript/tags","blobs_url":"https://api.github.com/repos/exercism/xpurescript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/xpurescript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/xpurescript/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/xpurescript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/xpurescript/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/xpurescript/languages","stargazers_url":"https://api.github.com/repos/exercism/xpurescript/stargazers","contributors_url":"https://api.github.com/repos/exercism/xpurescript/contributors","subscribers_url":"https://api.github.com/repos/exercism/xpurescript/subscribers","subscription_url":"https://api.github.com/repos/exercism/xpurescript/subscription","commits_url":"https://api.github.com/repos/exercism/xpurescript/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/xpurescript/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/xpurescript/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/xpurescript/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/xpurescript/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/xpurescript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/xpurescript/merges","archive_url":"https://api.github.com/repos/exercism/xpurescript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/xpurescript/downloads","issues_url":"https://api.github.com/repos/exercism/xpurescript/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/xpurescript/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/xpurescript/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/xpurescript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/xpurescript/labels{/name}","releases_url":"https://api.github.com/repos/exercism/xpurescript/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/xpurescript/deployments","created_at":"2016-07-05T21:31:06Z","updated_at":"2017-01-03T07:28:23Z","pushed_at":"2017-03-11T01:07:50Z","git_url":"git://github.com/exercism/xpurescript.git","ssh_url":"git@github.com:exercism/xpurescript.git","clone_url":"https://github.com/exercism/xpurescript.git","svn_url":"https://github.com/exercism/xpurescript","homepage":null,"size":24,"stargazers_count":6,"watchers_count":6,"language":"PureScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/xpurescript/pulls/22"},"html":{"href":"https://github.com/exercism/xpurescript/pull/22"},"issue":{"href":"https://api.github.com/repos/exercism/xpurescript/issues/22"},"comments":{"href":"https://api.github.com/repos/exercism/xpurescript/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/xpurescript/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/xpurescript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/xpurescript/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/xpurescript/statuses/dce43fc92a07757f6d45a931742043f8961de667"}}}}
{"actor":{"display_login":"icyrockcom"}}