{"action":"created","comment":{"url":"https://api.github.com/repos/carp-lang/Carp/pulls/comments/239791701","pull_request_review_id":182672538,"id":239791701,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTc5MTcwMQ==","diff_hunk":"@@ -123,6 +123,25 @@\n     (let [idx (Int.positive-mod (hash k) @(n-buckets m))]\n       (Bucket.get (Array.nth (buckets m) idx) k)))\n \n+  (doc update \"Update value at key k in map with function f, if it exists.\")\n+  (defn update [m k f]\n+    (let [idx (Int.positive-mod (hash k) @(n-buckets &m))]\n+      (update-buckets m &(fn [b]\n+        (let [n (Array.nth &b idx)]\n+          (if (Bucket.contains? n k)\n+            (Array.aset b idx (Bucket.put n k &(f (Bucket.get n k))))","path":"core/Map.carp","position":10,"original_position":10,"commit_id":"10a9de39da3ac42d61b5b4d7d109a99895c18e65","original_commit_id":"10a9de39da3ac42d61b5b4d7d109a99895c18e65","user":{"login":"opqdonut","id":207385,"node_id":"MDQ6VXNlcjIwNzM4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/207385?v=4","gravatar_id":"","url":"https://api.github.com/users/opqdonut","html_url":"https://github.com/opqdonut","followers_url":"https://api.github.com/users/opqdonut/followers","following_url":"https://api.github.com/users/opqdonut/following{/other_user}","gists_url":"https://api.github.com/users/opqdonut/gists{/gist_id}","starred_url":"https://api.github.com/users/opqdonut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opqdonut/subscriptions","organizations_url":"https://api.github.com/users/opqdonut/orgs","repos_url":"https://api.github.com/users/opqdonut/repos","events_url":"https://api.github.com/users/opqdonut/events{/privacy}","received_events_url":"https://api.github.com/users/opqdonut/received_events","type":"User","site_admin":false},"body":"yeah that makes sense","created_at":"2018-12-07T12:31:10Z","updated_at":"2018-12-07T12:31:10Z","html_url":"https://github.com/carp-lang/Carp/pull/345#discussion_r239791701","pull_request_url":"https://api.github.com/repos/carp-lang/Carp/pulls/345","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/carp-lang/Carp/pulls/comments/239791701"},"html":{"href":"https://github.com/carp-lang/Carp/pull/345#discussion_r239791701"},"pull_request":{"href":"https://api.github.com/repos/carp-lang/Carp/pulls/345"}},"in_reply_to_id":239791438},"pull_request":{"url":"https://api.github.com/repos/carp-lang/Carp/pulls/345","id":236841357,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2ODQxMzU3","html_url":"https://github.com/carp-lang/Carp/pull/345","diff_url":"https://github.com/carp-lang/Carp/pull/345.diff","patch_url":"https://github.com/carp-lang/Carp/pull/345.patch","issue_url":"https://api.github.com/repos/carp-lang/Carp/issues/345","number":345,"state":"open","locked":false,"title":"core/Map.carp: some new functions","user":{"login":"opqdonut","id":207385,"node_id":"MDQ6VXNlcjIwNzM4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/207385?v=4","gravatar_id":"","url":"https://api.github.com/users/opqdonut","html_url":"https://github.com/opqdonut","followers_url":"https://api.github.com/users/opqdonut/followers","following_url":"https://api.github.com/users/opqdonut/following{/other_user}","gists_url":"https://api.github.com/users/opqdonut/gists{/gist_id}","starred_url":"https://api.github.com/users/opqdonut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opqdonut/subscriptions","organizations_url":"https://api.github.com/users/opqdonut/orgs","repos_url":"https://api.github.com/users/opqdonut/repos","events_url":"https://api.github.com/users/opqdonut/events{/privacy}","received_events_url":"https://api.github.com/users/opqdonut/received_events","type":"User","site_admin":false},"body":null,"created_at":"2018-12-07T11:44:49Z","updated_at":"2018-12-07T12:31:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53974b03ab31fd1edc370f212966d5acff8aa00d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/carp-lang/Carp/pulls/345/commits","review_comments_url":"https://api.github.com/repos/carp-lang/Carp/pulls/345/comments","review_comment_url":"https://api.github.com/repos/carp-lang/Carp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/carp-lang/Carp/issues/345/comments","statuses_url":"https://api.github.com/repos/carp-lang/Carp/statuses/10a9de39da3ac42d61b5b4d7d109a99895c18e65","head":{"label":"opqdonut:map-additions","ref":"map-additions","sha":"10a9de39da3ac42d61b5b4d7d109a99895c18e65","user":{"login":"opqdonut","id":207385,"node_id":"MDQ6VXNlcjIwNzM4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/207385?v=4","gravatar_id":"","url":"https://api.github.com/users/opqdonut","html_url":"https://github.com/opqdonut","followers_url":"https://api.github.com/users/opqdonut/followers","following_url":"https://api.github.com/users/opqdonut/following{/other_user}","gists_url":"https://api.github.com/users/opqdonut/gists{/gist_id}","starred_url":"https://api.github.com/users/opqdonut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opqdonut/subscriptions","organizations_url":"https://api.github.com/users/opqdonut/orgs","repos_url":"https://api.github.com/users/opqdonut/repos","events_url":"https://api.github.com/users/opqdonut/events{/privacy}","received_events_url":"https://api.github.com/users/opqdonut/received_events","type":"User","site_admin":false},"repo":{"id":159927192,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk5MjcxOTI=","name":"Carp","full_name":"opqdonut/Carp","private":false,"owner":{"login":"opqdonut","id":207385,"node_id":"MDQ6VXNlcjIwNzM4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/207385?v=4","gravatar_id":"","url":"https://api.github.com/users/opqdonut","html_url":"https://github.com/opqdonut","followers_url":"https://api.github.com/users/opqdonut/followers","following_url":"https://api.github.com/users/opqdonut/following{/other_user}","gists_url":"https://api.github.com/users/opqdonut/gists{/gist_id}","starred_url":"https://api.github.com/users/opqdonut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opqdonut/subscriptions","organizations_url":"https://api.github.com/users/opqdonut/orgs","repos_url":"https://api.github.com/users/opqdonut/repos","events_url":"https://api.github.com/users/opqdonut/events{/privacy}","received_events_url":"https://api.github.com/users/opqdonut/received_events","type":"User","site_admin":false},"html_url":"https://github.com/opqdonut/Carp","description":"A statically typed lisp, without a GC, for real-time applications.","fork":true,"url":"https://api.github.com/repos/opqdonut/Carp","forks_url":"https://api.github.com/repos/opqdonut/Carp/forks","keys_url":"https://api.github.com/repos/opqdonut/Carp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opqdonut/Carp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opqdonut/Carp/teams","hooks_url":"https://api.github.com/repos/opqdonut/Carp/hooks","issue_events_url":"https://api.github.com/repos/opqdonut/Carp/issues/events{/number}","events_url":"https://api.github.com/repos/opqdonut/Carp/events","assignees_url":"https://api.github.com/repos/opqdonut/Carp/assignees{/user}","branches_url":"https://api.github.com/repos/opqdonut/Carp/branches{/branch}","tags_url":"https://api.github.com/repos/opqdonut/Carp/tags","blobs_url":"https://api.github.com/repos/opqdonut/Carp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opqdonut/Carp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opqdonut/Carp/git/refs{/sha}","trees_url":"https://api.github.com/repos/opqdonut/Carp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opqdonut/Carp/statuses/{sha}","languages_url":"https://api.github.com/repos/opqdonut/Carp/languages","stargazers_url":"https://api.github.com/repos/opqdonut/Carp/stargazers","contributors_url":"https://api.github.com/repos/opqdonut/Carp/contributors","subscribers_url":"https://api.github.com/repos/opqdonut/Carp/subscribers","subscription_url":"https://api.github.com/repos/opqdonut/Carp/subscription","commits_url":"https://api.github.com/repos/opqdonut/Carp/commits{/sha}","git_commits_url":"https://api.github.com/repos/opqdonut/Carp/git/commits{/sha}","comments_url":"https://api.github.com/repos/opqdonut/Carp/comments{/number}","issue_comment_url":"https://api.github.com/repos/opqdonut/Carp/issues/comments{/number}","contents_url":"https://api.github.com/repos/opqdonut/Carp/contents/{+path}","compare_url":"https://api.github.com/repos/opqdonut/Carp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opqdonut/Carp/merges","archive_url":"https://api.github.com/repos/opqdonut/Carp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opqdonut/Carp/downloads","issues_url":"https://api.github.com/repos/opqdonut/Carp/issues{/number}","pulls_url":"https://api.github.com/repos/opqdonut/Carp/pulls{/number}","milestones_url":"https://api.github.com/repos/opqdonut/Carp/milestones{/number}","notifications_url":"https://api.github.com/repos/opqdonut/Carp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opqdonut/Carp/labels{/name}","releases_url":"https://api.github.com/repos/opqdonut/Carp/releases{/id}","deployments_url":"https://api.github.com/repos/opqdonut/Carp/deployments","created_at":"2018-12-01T09:05:49Z","updated_at":"2018-12-05T20:53:15Z","pushed_at":"2018-12-07T12:13:48Z","git_url":"git://github.com/opqdonut/Carp.git","ssh_url":"git@github.com:opqdonut/Carp.git","clone_url":"https://github.com/opqdonut/Carp.git","svn_url":"https://github.com/opqdonut/Carp","homepage":"","size":7145,"stargazers_count":0,"watchers_count":0,"language":"Haskell","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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"carp-lang:master","ref":"master","sha":"55d478c01f460593d3877d2371ca55eeb7e36cb7","user":{"login":"carp-lang","id":20434801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDM0ODAx","avatar_url":"https://avatars1.githubusercontent.com/u/20434801?v=4","gravatar_id":"","url":"https://api.github.com/users/carp-lang","html_url":"https://github.com/carp-lang","followers_url":"https://api.github.com/users/carp-lang/followers","following_url":"https://api.github.com/users/carp-lang/following{/other_user}","gists_url":"https://api.github.com/users/carp-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/carp-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carp-lang/subscriptions","organizations_url":"https://api.github.com/users/carp-lang/orgs","repos_url":"https://api.github.com/users/carp-lang/repos","events_url":"https://api.github.com/users/carp-lang/events{/privacy}","received_events_url":"https://api.github.com/users/carp-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":49426320,"node_id":"MDEwOlJlcG9zaXRvcnk0OTQyNjMyMA==","name":"Carp","full_name":"carp-lang/Carp","private":false,"owner":{"login":"carp-lang","id":20434801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDM0ODAx","avatar_url":"https://avatars1.githubusercontent.com/u/20434801?v=4","gravatar_id":"","url":"https://api.github.com/users/carp-lang","html_url":"https://github.com/carp-lang","followers_url":"https://api.github.com/users/carp-lang/followers","following_url":"https://api.github.com/users/carp-lang/following{/other_user}","gists_url":"https://api.github.com/users/carp-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/carp-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carp-lang/subscriptions","organizations_url":"https://api.github.com/users/carp-lang/orgs","repos_url":"https://api.github.com/users/carp-lang/repos","events_url":"https://api.github.com/users/carp-lang/events{/privacy}","received_events_url":"https://api.github.com/users/carp-lang/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/carp-lang/Carp","description":"A statically typed lisp, without a GC, for real-time applications.","fork":false,"url":"https://api.github.com/repos/carp-lang/Carp","forks_url":"https://api.github.com/repos/carp-lang/Carp/forks","keys_url":"https://api.github.com/repos/carp-lang/Carp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carp-lang/Carp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carp-lang/Carp/teams","hooks_url":"https://api.github.com/repos/carp-lang/Carp/hooks","issue_events_url":"https://api.github.com/repos/carp-lang/Carp/issues/events{/number}","events_url":"https://api.github.com/repos/carp-lang/Carp/events","assignees_url":"https://api.github.com/repos/carp-lang/Carp/assignees{/user}","branches_url":"https://api.github.com/repos/carp-lang/Carp/branches{/branch}","tags_url":"https://api.github.com/repos/carp-lang/Carp/tags","blobs_url":"https://api.github.com/repos/carp-lang/Carp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carp-lang/Carp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carp-lang/Carp/git/refs{/sha}","trees_url":"https://api.github.com/repos/carp-lang/Carp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carp-lang/Carp/statuses/{sha}","languages_url":"https://api.github.com/repos/carp-lang/Carp/languages","stargazers_url":"https://api.github.com/repos/carp-lang/Carp/stargazers","contributors_url":"https://api.github.com/repos/carp-lang/Carp/contributors","subscribers_url":"https://api.github.com/repos/carp-lang/Carp/subscribers","subscription_url":"https://api.github.com/repos/carp-lang/Carp/subscription","commits_url":"https://api.github.com/repos/carp-lang/Carp/commits{/sha}","git_commits_url":"https://api.github.com/repos/carp-lang/Carp/git/commits{/sha}","comments_url":"https://api.github.com/repos/carp-lang/Carp/comments{/number}","issue_comment_url":"https://api.github.com/repos/carp-lang/Carp/issues/comments{/number}","contents_url":"https://api.github.com/repos/carp-lang/Carp/contents/{+path}","compare_url":"https://api.github.com/repos/carp-lang/Carp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carp-lang/Carp/merges","archive_url":"https://api.github.com/repos/carp-lang/Carp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carp-lang/Carp/downloads","issues_url":"https://api.github.com/repos/carp-lang/Carp/issues{/number}","pulls_url":"https://api.github.com/repos/carp-lang/Carp/pulls{/number}","milestones_url":"https://api.github.com/repos/carp-lang/Carp/milestones{/number}","notifications_url":"https://api.github.com/repos/carp-lang/Carp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carp-lang/Carp/labels{/name}","releases_url":"https://api.github.com/repos/carp-lang/Carp/releases{/id}","deployments_url":"https://api.github.com/repos/carp-lang/Carp/deployments","created_at":"2016-01-11T12:54:09Z","updated_at":"2018-12-06T15:48:50Z","pushed_at":"2018-12-07T12:14:09Z","git_url":"git://github.com/carp-lang/Carp.git","ssh_url":"git@github.com:carp-lang/Carp.git","clone_url":"https://github.com/carp-lang/Carp.git","svn_url":"https://github.com/carp-lang/Carp","homepage":"","size":7141,"stargazers_count":2460,"watchers_count":2460,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":89,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":89,"open_issues":25,"watchers":2460,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/carp-lang/Carp/pulls/345"},"html":{"href":"https://github.com/carp-lang/Carp/pull/345"},"issue":{"href":"https://api.github.com/repos/carp-lang/Carp/issues/345"},"comments":{"href":"https://api.github.com/repos/carp-lang/Carp/issues/345/comments"},"review_comments":{"href":"https://api.github.com/repos/carp-lang/Carp/pulls/345/comments"},"review_comment":{"href":"https://api.github.com/repos/carp-lang/Carp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/carp-lang/Carp/pulls/345/commits"},"statuses":{"href":"https://api.github.com/repos/carp-lang/Carp/statuses/10a9de39da3ac42d61b5b4d7d109a99895c18e65"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"opqdonut"}}