{"action":"created","comment":{"url":"https://api.github.com/repos/rchain/rchain/pulls/comments/149697883","pull_request_review_id":75131683,"id":149697883,"diff_hunk":"@@ -0,0 +1,91 @@\n+;;; TODO: Implement match? for other data structures\n+(defOprn match?)\n+(defPure Tuple (match? other) (= (self) other))\n+\n+(defOprn get)\n+(defPure RblTable (get key)\n+    (tbl-get (self) (->symbol key))\n+)\n+\n+(defOprn getOrElse)\n+(defPure RblTable (getOrElse & keys/elseValue)\n+    (let*\n+        [\n+            ;;; TODO: Find way to deconstruct without reversing\n+            [[elseValue & reverse_keys] (reverse keys/elseValue)]\n+            [unreversed_keys (reverse reverse_keys)]\n+            [final_value\n+                (fold unreversed_keys\n+                    (proc [key acc k]\n+                        ;;; TODO: (null? key) is a proxy for checking if the unreversed_keys have exhausted.\n+                        ;;; We need to handle when key is null.\n+                        (if (null? key)\n+                            acc\n+                            (if (type? acc RblTable)\n+                                (let [[value (tbl-get acc (->symbol key))]]\n+                                    (if (= #absent value) elseValue (k value))\n+                                )\n+                                elseValue\n+                            )\n+                        )\n+                    )\n+                    (self))]\n+        ]\n+        final_value\n+    )\n+)\n+\n+(defOprn insert)\n+(defPure RblTable (insert & keys/value)\n+    ;;; Inserts (new RblTable) if a lookup is #absent when looping through keys\n+    (let*\n+        [\n+            ;;; TODO: Find way to deconstruct without reversing","path":"rosette/rbl/rosette/primitives.rbl","position":43,"original_position":43,"commit_id":"997418de11b8c0de971724b59b0c0e5811b44747","original_commit_id":"997418de11b8c0de971724b59b0c0e5811b44747","user":{"login":"pyrocto","id":30355933,"avatar_url":"https://avatars1.githubusercontent.com/u/30355933?v=4","gravatar_id":"","url":"https://api.github.com/users/pyrocto","html_url":"https://github.com/pyrocto","followers_url":"https://api.github.com/users/pyrocto/followers","following_url":"https://api.github.com/users/pyrocto/following{/other_user}","gists_url":"https://api.github.com/users/pyrocto/gists{/gist_id}","starred_url":"https://api.github.com/users/pyrocto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyrocto/subscriptions","organizations_url":"https://api.github.com/users/pyrocto/orgs","repos_url":"https://api.github.com/users/pyrocto/repos","events_url":"https://api.github.com/users/pyrocto/events{/privacy}","received_events_url":"https://api.github.com/users/pyrocto/received_events","type":"User","site_admin":false},"body":"Ping","created_at":"2017-11-08T15:15:22Z","updated_at":"2017-11-08T15:15:22Z","html_url":"https://github.com/rchain/rchain/pull/47#discussion_r149697883","pull_request_url":"https://api.github.com/repos/rchain/rchain/pulls/47","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments/149697883"},"html":{"href":"https://github.com/rchain/rchain/pull/47#discussion_r149697883"},"pull_request":{"href":"https://api.github.com/repos/rchain/rchain/pulls/47"}},"in_reply_to_id":149102755},"pull_request":{"url":"https://api.github.com/repos/rchain/rchain/pulls/47","id":150699419,"html_url":"https://github.com/rchain/rchain/pull/47","diff_url":"https://github.com/rchain/rchain/pull/47.diff","patch_url":"https://github.com/rchain/rchain/pull/47.patch","issue_url":"https://api.github.com/repos/rchain/rchain/issues/47","number":47,"state":"open","locked":false,"title":"Move space.rbl under rosette/","user":{"login":"KentShikama","id":6329898,"avatar_url":"https://avatars0.githubusercontent.com/u/6329898?v=4","gravatar_id":"","url":"https://api.github.com/users/KentShikama","html_url":"https://github.com/KentShikama","followers_url":"https://api.github.com/users/KentShikama/followers","following_url":"https://api.github.com/users/KentShikama/following{/other_user}","gists_url":"https://api.github.com/users/KentShikama/gists{/gist_id}","starred_url":"https://api.github.com/users/KentShikama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KentShikama/subscriptions","organizations_url":"https://api.github.com/users/KentShikama/orgs","repos_url":"https://api.github.com/users/KentShikama/repos","events_url":"https://api.github.com/users/KentShikama/events{/privacy}","received_events_url":"https://api.github.com/users/KentShikama/received_events","type":"User","site_admin":false},"body":"Other minor/subchanges\r\n\r\nI've also split the primitives into a new file.","created_at":"2017-11-04T23:19:19Z","updated_at":"2017-11-08T15:15:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ec2e38752e7443fd50f0546a1ef489ca7c6a65b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rchain/rchain/pulls/47/commits","review_comments_url":"https://api.github.com/repos/rchain/rchain/pulls/47/comments","review_comment_url":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rchain/rchain/issues/47/comments","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/997418de11b8c0de971724b59b0c0e5811b44747","head":{"label":"rchain:dev-kent-rosette-move","ref":"dev-kent-rosette-move","sha":"997418de11b8c0de971724b59b0c0e5811b44747","user":{"login":"rchain","id":20671765,"avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"repo":{"id":84493691,"name":"rchain","full_name":"rchain/rchain","owner":{"login":"rchain","id":20671765,"avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rchain/rchain","description":null,"fork":false,"url":"https://api.github.com/repos/rchain/rchain","forks_url":"https://api.github.com/repos/rchain/rchain/forks","keys_url":"https://api.github.com/repos/rchain/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rchain/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rchain/rchain/teams","hooks_url":"https://api.github.com/repos/rchain/rchain/hooks","issue_events_url":"https://api.github.com/repos/rchain/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/rchain/rchain/events","assignees_url":"https://api.github.com/repos/rchain/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/rchain/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/rchain/rchain/tags","blobs_url":"https://api.github.com/repos/rchain/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rchain/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rchain/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rchain/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/rchain/rchain/languages","stargazers_url":"https://api.github.com/repos/rchain/rchain/stargazers","contributors_url":"https://api.github.com/repos/rchain/rchain/contributors","subscribers_url":"https://api.github.com/repos/rchain/rchain/subscribers","subscription_url":"https://api.github.com/repos/rchain/rchain/subscription","commits_url":"https://api.github.com/repos/rchain/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rchain/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rchain/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rchain/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rchain/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/rchain/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rchain/rchain/merges","archive_url":"https://api.github.com/repos/rchain/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rchain/rchain/downloads","issues_url":"https://api.github.com/repos/rchain/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/rchain/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/rchain/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/rchain/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rchain/rchain/labels{/name}","releases_url":"https://api.github.com/repos/rchain/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/rchain/rchain/deployments","created_at":"2017-03-09T22:15:35Z","updated_at":"2017-10-23T20:54:40Z","pushed_at":"2017-11-08T05:24:20Z","git_url":"git://github.com/rchain/rchain.git","ssh_url":"git@github.com:rchain/rchain.git","clone_url":"https://github.com/rchain/rchain.git","svn_url":"https://github.com/rchain/rchain","homepage":null,"size":1638,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":16,"default_branch":"master"}},"base":{"label":"rchain:dev","ref":"dev","sha":"1539fe9651cfac91aab4e3121f3192402a09811a","user":{"login":"rchain","id":20671765,"avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"repo":{"id":84493691,"name":"rchain","full_name":"rchain/rchain","owner":{"login":"rchain","id":20671765,"avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rchain/rchain","description":null,"fork":false,"url":"https://api.github.com/repos/rchain/rchain","forks_url":"https://api.github.com/repos/rchain/rchain/forks","keys_url":"https://api.github.com/repos/rchain/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rchain/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rchain/rchain/teams","hooks_url":"https://api.github.com/repos/rchain/rchain/hooks","issue_events_url":"https://api.github.com/repos/rchain/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/rchain/rchain/events","assignees_url":"https://api.github.com/repos/rchain/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/rchain/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/rchain/rchain/tags","blobs_url":"https://api.github.com/repos/rchain/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rchain/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rchain/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rchain/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/rchain/rchain/languages","stargazers_url":"https://api.github.com/repos/rchain/rchain/stargazers","contributors_url":"https://api.github.com/repos/rchain/rchain/contributors","subscribers_url":"https://api.github.com/repos/rchain/rchain/subscribers","subscription_url":"https://api.github.com/repos/rchain/rchain/subscription","commits_url":"https://api.github.com/repos/rchain/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rchain/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rchain/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rchain/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rchain/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/rchain/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rchain/rchain/merges","archive_url":"https://api.github.com/repos/rchain/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rchain/rchain/downloads","issues_url":"https://api.github.com/repos/rchain/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/rchain/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/rchain/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/rchain/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rchain/rchain/labels{/name}","releases_url":"https://api.github.com/repos/rchain/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/rchain/rchain/deployments","created_at":"2017-03-09T22:15:35Z","updated_at":"2017-10-23T20:54:40Z","pushed_at":"2017-11-08T05:24:20Z","git_url":"git://github.com/rchain/rchain.git","ssh_url":"git@github.com:rchain/rchain.git","clone_url":"https://github.com/rchain/rchain.git","svn_url":"https://github.com/rchain/rchain","homepage":null,"size":1638,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/47"},"html":{"href":"https://github.com/rchain/rchain/pull/47"},"issue":{"href":"https://api.github.com/repos/rchain/rchain/issues/47"},"comments":{"href":"https://api.github.com/repos/rchain/rchain/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/rchain/rchain/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rchain/rchain/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/rchain/rchain/statuses/997418de11b8c0de971724b59b0c0e5811b44747"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"pyrocto"}}