{"action":"created","comment":{"url":"https://api.github.com/repos/Artris/algorithms/pulls/comments/207699470","pull_request_review_id":143372514,"id":207699470,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzY5OTQ3MA==","diff_hunk":"@@ -0,0 +1,91 @@\n+type node = {\n+    id: string,\n+    neighbours: list(string),\n+};\n+type returnResult = {\n+    level: Hashtbl.t(string, int), \n+    parent: Hashtbl.t(string, string)\n+};\n+\n+exception NodeNotExist(string);\n+\n+let toHashTbl = adj_list => {\n+    let adj_tbl = Hashtbl.create(List.length(adj_list));\n+    let insert = node => {\n+        Hashtbl.add(adj_tbl, node.id, node.neighbours);\n+    };\n+    let validateNeighbours = node => {\n+        List.iter(neighbour => {\n+            switch (Hashtbl.find(adj_tbl, neighbour)) {\n+            | exception Not_found => raise(NodeNotExist(neighbour));\n+            | _ => ();\n+            };\n+        }, node.neighbours);\n+    };\n+\n+    List.iter(insert, adj_list);","path":"src/graphs/Breadth_First_Search.re","position":26,"original_position":26,"commit_id":"5c877b6e123b19c879e95ed509f7529182314002","original_commit_id":"5c877b6e123b19c879e95ed509f7529182314002","user":{"login":"alireza-a","id":15719232,"node_id":"MDQ6VXNlcjE1NzE5MjMy","avatar_url":"https://avatars3.githubusercontent.com/u/15719232?v=4","gravatar_id":"","url":"https://api.github.com/users/alireza-a","html_url":"https://github.com/alireza-a","followers_url":"https://api.github.com/users/alireza-a/followers","following_url":"https://api.github.com/users/alireza-a/following{/other_user}","gists_url":"https://api.github.com/users/alireza-a/gists{/gist_id}","starred_url":"https://api.github.com/users/alireza-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alireza-a/subscriptions","organizations_url":"https://api.github.com/users/alireza-a/orgs","repos_url":"https://api.github.com/users/alireza-a/repos","events_url":"https://api.github.com/users/alireza-a/events{/privacy}","received_events_url":"https://api.github.com/users/alireza-a/received_events","type":"User","site_admin":false},"body":"You can combine this and insert and move this line before the validation stuff.","created_at":"2018-08-04T04:21:37Z","updated_at":"2018-08-04T04:43:27Z","html_url":"https://github.com/Artris/algorithms/pull/17#discussion_r207699470","pull_request_url":"https://api.github.com/repos/Artris/algorithms/pulls/17","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Artris/algorithms/pulls/comments/207699470"},"html":{"href":"https://github.com/Artris/algorithms/pull/17#discussion_r207699470"},"pull_request":{"href":"https://api.github.com/repos/Artris/algorithms/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/Artris/algorithms/pulls/17","id":204669654,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjY5NjU0","html_url":"https://github.com/Artris/algorithms/pull/17","diff_url":"https://github.com/Artris/algorithms/pull/17.diff","patch_url":"https://github.com/Artris/algorithms/pull/17.patch","issue_url":"https://api.github.com/repos/Artris/algorithms/issues/17","number":17,"state":"open","locked":false,"title":"breadth first search","user":{"login":"selfeki","id":25670459,"node_id":"MDQ6VXNlcjI1NjcwNDU5","avatar_url":"https://avatars2.githubusercontent.com/u/25670459?v=4","gravatar_id":"","url":"https://api.github.com/users/selfeki","html_url":"https://github.com/selfeki","followers_url":"https://api.github.com/users/selfeki/followers","following_url":"https://api.github.com/users/selfeki/following{/other_user}","gists_url":"https://api.github.com/users/selfeki/gists{/gist_id}","starred_url":"https://api.github.com/users/selfeki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selfeki/subscriptions","organizations_url":"https://api.github.com/users/selfeki/orgs","repos_url":"https://api.github.com/users/selfeki/repos","events_url":"https://api.github.com/users/selfeki/events{/privacy}","received_events_url":"https://api.github.com/users/selfeki/received_events","type":"User","site_admin":false},"body":"implementation of breadth-first search","created_at":"2018-07-30T00:18:42Z","updated_at":"2018-08-04T04:43:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6aa4a2f9d25dfd18dbb2379ac567b486923e779","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Artris/algorithms/pulls/17/commits","review_comments_url":"https://api.github.com/repos/Artris/algorithms/pulls/17/comments","review_comment_url":"https://api.github.com/repos/Artris/algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Artris/algorithms/issues/17/comments","statuses_url":"https://api.github.com/repos/Artris/algorithms/statuses/5c877b6e123b19c879e95ed509f7529182314002","head":{"label":"selfeki:bfs","ref":"bfs","sha":"5c877b6e123b19c879e95ed509f7529182314002","user":{"login":"selfeki","id":25670459,"node_id":"MDQ6VXNlcjI1NjcwNDU5","avatar_url":"https://avatars2.githubusercontent.com/u/25670459?v=4","gravatar_id":"","url":"https://api.github.com/users/selfeki","html_url":"https://github.com/selfeki","followers_url":"https://api.github.com/users/selfeki/followers","following_url":"https://api.github.com/users/selfeki/following{/other_user}","gists_url":"https://api.github.com/users/selfeki/gists{/gist_id}","starred_url":"https://api.github.com/users/selfeki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selfeki/subscriptions","organizations_url":"https://api.github.com/users/selfeki/orgs","repos_url":"https://api.github.com/users/selfeki/repos","events_url":"https://api.github.com/users/selfeki/events{/privacy}","received_events_url":"https://api.github.com/users/selfeki/received_events","type":"User","site_admin":false},"repo":{"id":142064050,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIwNjQwNTA=","name":"algorithms","full_name":"selfeki/algorithms","owner":{"login":"selfeki","id":25670459,"node_id":"MDQ6VXNlcjI1NjcwNDU5","avatar_url":"https://avatars2.githubusercontent.com/u/25670459?v=4","gravatar_id":"","url":"https://api.github.com/users/selfeki","html_url":"https://github.com/selfeki","followers_url":"https://api.github.com/users/selfeki/followers","following_url":"https://api.github.com/users/selfeki/following{/other_user}","gists_url":"https://api.github.com/users/selfeki/gists{/gist_id}","starred_url":"https://api.github.com/users/selfeki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selfeki/subscriptions","organizations_url":"https://api.github.com/users/selfeki/orgs","repos_url":"https://api.github.com/users/selfeki/repos","events_url":"https://api.github.com/users/selfeki/events{/privacy}","received_events_url":"https://api.github.com/users/selfeki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/selfeki/algorithms","description":"Algorithms and Data Structures in ReasonML","fork":true,"url":"https://api.github.com/repos/selfeki/algorithms","forks_url":"https://api.github.com/repos/selfeki/algorithms/forks","keys_url":"https://api.github.com/repos/selfeki/algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/selfeki/algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/selfeki/algorithms/teams","hooks_url":"https://api.github.com/repos/selfeki/algorithms/hooks","issue_events_url":"https://api.github.com/repos/selfeki/algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/selfeki/algorithms/events","assignees_url":"https://api.github.com/repos/selfeki/algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/selfeki/algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/selfeki/algorithms/tags","blobs_url":"https://api.github.com/repos/selfeki/algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/selfeki/algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/selfeki/algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/selfeki/algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/selfeki/algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/selfeki/algorithms/languages","stargazers_url":"https://api.github.com/repos/selfeki/algorithms/stargazers","contributors_url":"https://api.github.com/repos/selfeki/algorithms/contributors","subscribers_url":"https://api.github.com/repos/selfeki/algorithms/subscribers","subscription_url":"https://api.github.com/repos/selfeki/algorithms/subscription","commits_url":"https://api.github.com/repos/selfeki/algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/selfeki/algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/selfeki/algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/selfeki/algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/selfeki/algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/selfeki/algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/selfeki/algorithms/merges","archive_url":"https://api.github.com/repos/selfeki/algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/selfeki/algorithms/downloads","issues_url":"https://api.github.com/repos/selfeki/algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/selfeki/algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/selfeki/algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/selfeki/algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/selfeki/algorithms/labels{/name}","releases_url":"https://api.github.com/repos/selfeki/algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/selfeki/algorithms/deployments","created_at":"2018-07-23T20:10:10Z","updated_at":"2018-07-29T18:23:44Z","pushed_at":"2018-08-04T03:51:24Z","git_url":"git://github.com/selfeki/algorithms.git","ssh_url":"git@github.com:selfeki/algorithms.git","clone_url":"https://github.com/selfeki/algorithms.git","svn_url":"https://github.com/selfeki/algorithms","homepage":"","size":80,"stargazers_count":0,"watchers_count":0,"language":"OCaml","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":"master"}},"base":{"label":"Artris:master","ref":"master","sha":"4ee629b8591c6e63f60ca5868df5a7ba0a468fa7","user":{"login":"Artris","id":33600538,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNjAwNTM4","avatar_url":"https://avatars2.githubusercontent.com/u/33600538?v=4","gravatar_id":"","url":"https://api.github.com/users/Artris","html_url":"https://github.com/Artris","followers_url":"https://api.github.com/users/Artris/followers","following_url":"https://api.github.com/users/Artris/following{/other_user}","gists_url":"https://api.github.com/users/Artris/gists{/gist_id}","starred_url":"https://api.github.com/users/Artris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Artris/subscriptions","organizations_url":"https://api.github.com/users/Artris/orgs","repos_url":"https://api.github.com/users/Artris/repos","events_url":"https://api.github.com/users/Artris/events{/privacy}","received_events_url":"https://api.github.com/users/Artris/received_events","type":"Organization","site_admin":false},"repo":{"id":139945736,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk5NDU3MzY=","name":"algorithms","full_name":"Artris/algorithms","owner":{"login":"Artris","id":33600538,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNjAwNTM4","avatar_url":"https://avatars2.githubusercontent.com/u/33600538?v=4","gravatar_id":"","url":"https://api.github.com/users/Artris","html_url":"https://github.com/Artris","followers_url":"https://api.github.com/users/Artris/followers","following_url":"https://api.github.com/users/Artris/following{/other_user}","gists_url":"https://api.github.com/users/Artris/gists{/gist_id}","starred_url":"https://api.github.com/users/Artris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Artris/subscriptions","organizations_url":"https://api.github.com/users/Artris/orgs","repos_url":"https://api.github.com/users/Artris/repos","events_url":"https://api.github.com/users/Artris/events{/privacy}","received_events_url":"https://api.github.com/users/Artris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Artris/algorithms","description":"Algorithms and Data Structures in ReasonML","fork":false,"url":"https://api.github.com/repos/Artris/algorithms","forks_url":"https://api.github.com/repos/Artris/algorithms/forks","keys_url":"https://api.github.com/repos/Artris/algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Artris/algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Artris/algorithms/teams","hooks_url":"https://api.github.com/repos/Artris/algorithms/hooks","issue_events_url":"https://api.github.com/repos/Artris/algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/Artris/algorithms/events","assignees_url":"https://api.github.com/repos/Artris/algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/Artris/algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/Artris/algorithms/tags","blobs_url":"https://api.github.com/repos/Artris/algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Artris/algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Artris/algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Artris/algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Artris/algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/Artris/algorithms/languages","stargazers_url":"https://api.github.com/repos/Artris/algorithms/stargazers","contributors_url":"https://api.github.com/repos/Artris/algorithms/contributors","subscribers_url":"https://api.github.com/repos/Artris/algorithms/subscribers","subscription_url":"https://api.github.com/repos/Artris/algorithms/subscription","commits_url":"https://api.github.com/repos/Artris/algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Artris/algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Artris/algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Artris/algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/Artris/algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/Artris/algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Artris/algorithms/merges","archive_url":"https://api.github.com/repos/Artris/algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Artris/algorithms/downloads","issues_url":"https://api.github.com/repos/Artris/algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/Artris/algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/Artris/algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/Artris/algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Artris/algorithms/labels{/name}","releases_url":"https://api.github.com/repos/Artris/algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/Artris/algorithms/deployments","created_at":"2018-07-06T06:57:44Z","updated_at":"2018-08-03T20:22:41Z","pushed_at":"2018-08-04T03:51:26Z","git_url":"git://github.com/Artris/algorithms.git","ssh_url":"git@github.com:Artris/algorithms.git","clone_url":"https://github.com/Artris/algorithms.git","svn_url":"https://github.com/Artris/algorithms","homepage":"","size":80,"stargazers_count":19,"watchers_count":19,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":3,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Artris/algorithms/pulls/17"},"html":{"href":"https://github.com/Artris/algorithms/pull/17"},"issue":{"href":"https://api.github.com/repos/Artris/algorithms/issues/17"},"comments":{"href":"https://api.github.com/repos/Artris/algorithms/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/Artris/algorithms/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/Artris/algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Artris/algorithms/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/Artris/algorithms/statuses/5c877b6e123b19c879e95ed509f7529182314002"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"alireza-a"}}