{"action":"created","comment":{"url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/comments/174354754","pull_request_review_id":103693801,"id":174354754,"diff_hunk":"@@ -0,0 +1,27 @@\n+let getExn = function\n+  | Some x -> x\n+  | None -> assert false\n+\n+let fold opt default f = match opt with\n+  | Some x -> f x\n+  | None -> default\n+\n+let map opt f = match opt with\n+  | Some x -> Some (f x)\n+  | None -> None\n+\n+let flatMap opt f = match opt with\n+  | Some x -> f x\n+  | None -> None\n+\n+let getOrElse opt default = match opt with\n+  | Some x -> x\n+  | None -> default\n+\n+let exists = function","path":"jscomp/others/belt_Option.ml","position":21,"original_position":21,"commit_id":"6ed6ca26d97bf2ef2ee7440c9a4e19cc33a0e4a6","original_commit_id":"6ed6ca26d97bf2ef2ee7440c9a4e19cc33a0e4a6","user":{"login":"chenglou","id":1909539,"avatar_url":"https://avatars2.githubusercontent.com/u/1909539?v=4","gravatar_id":"","url":"https://api.github.com/users/chenglou","html_url":"https://github.com/chenglou","followers_url":"https://api.github.com/users/chenglou/followers","following_url":"https://api.github.com/users/chenglou/following{/other_user}","gists_url":"https://api.github.com/users/chenglou/gists{/gist_id}","starred_url":"https://api.github.com/users/chenglou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenglou/subscriptions","organizations_url":"https://api.github.com/users/chenglou/orgs","repos_url":"https://api.github.com/users/chenglou/repos","events_url":"https://api.github.com/users/chenglou/events{/privacy}","received_events_url":"https://api.github.com/users/chenglou/received_events","type":"User","site_admin":false},"body":"Actually, not sure why `Belt.List.has` exists","created_at":"2018-03-14T05:15:24Z","updated_at":"2018-03-14T05:15:24Z","html_url":"https://github.com/BuckleScript/bucklescript/pull/2622#discussion_r174354754","pull_request_url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/comments/174354754"},"html":{"href":"https://github.com/BuckleScript/bucklescript/pull/2622#discussion_r174354754"},"pull_request":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622"}},"in_reply_to_id":174344792},"pull_request":{"url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622","id":174824765,"html_url":"https://github.com/BuckleScript/bucklescript/pull/2622","diff_url":"https://github.com/BuckleScript/bucklescript/pull/2622.diff","patch_url":"https://github.com/BuckleScript/bucklescript/pull/2622.patch","issue_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2622","number":2622,"state":"open","locked":false,"title":"Add option module to Belt","user":{"login":"arnarthor","id":4514159,"avatar_url":"https://avatars2.githubusercontent.com/u/4514159?v=4","gravatar_id":"","url":"https://api.github.com/users/arnarthor","html_url":"https://github.com/arnarthor","followers_url":"https://api.github.com/users/arnarthor/followers","following_url":"https://api.github.com/users/arnarthor/following{/other_user}","gists_url":"https://api.github.com/users/arnarthor/gists{/gist_id}","starred_url":"https://api.github.com/users/arnarthor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnarthor/subscriptions","organizations_url":"https://api.github.com/users/arnarthor/orgs","repos_url":"https://api.github.com/users/arnarthor/repos","events_url":"https://api.github.com/users/arnarthor/events{/privacy}","received_events_url":"https://api.github.com/users/arnarthor/received_events","type":"User","site_admin":false},"body":"This adds the following utility functions for the option data type to belt.\r\n\r\n```ocaml\r\nval getExn : 'a option -> 'a\r\nval fold : 'a option -> 'b -> ('a -> 'b) -> 'b\r\nval map : 'a option -> ('a -> 'b) -> 'b option\r\nval flatMap : 'a option -> ('a -> 'b option) -> 'b option\r\nval getOrElse : 'a option -> 'a -> 'a\r\nval exists : 'a option -> bool\r\nval empty : 'a option -> bool\r\n```","created_at":"2018-03-14T00:21:31Z","updated_at":"2018-03-14T05:15:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8d0a0e4525613a1726af39e89f27ffe638ac999","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622/commits","review_comments_url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622/comments","review_comment_url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2622/comments","statuses_url":"https://api.github.com/repos/BuckleScript/bucklescript/statuses/6ed6ca26d97bf2ef2ee7440c9a4e19cc33a0e4a6","head":{"label":"arnarthor:master","ref":"master","sha":"6ed6ca26d97bf2ef2ee7440c9a4e19cc33a0e4a6","user":{"login":"arnarthor","id":4514159,"avatar_url":"https://avatars2.githubusercontent.com/u/4514159?v=4","gravatar_id":"","url":"https://api.github.com/users/arnarthor","html_url":"https://github.com/arnarthor","followers_url":"https://api.github.com/users/arnarthor/followers","following_url":"https://api.github.com/users/arnarthor/following{/other_user}","gists_url":"https://api.github.com/users/arnarthor/gists{/gist_id}","starred_url":"https://api.github.com/users/arnarthor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnarthor/subscriptions","organizations_url":"https://api.github.com/users/arnarthor/orgs","repos_url":"https://api.github.com/users/arnarthor/repos","events_url":"https://api.github.com/users/arnarthor/events{/privacy}","received_events_url":"https://api.github.com/users/arnarthor/received_events","type":"User","site_admin":false},"repo":{"id":125131290,"name":"bucklescript","full_name":"arnarthor/bucklescript","owner":{"login":"arnarthor","id":4514159,"avatar_url":"https://avatars2.githubusercontent.com/u/4514159?v=4","gravatar_id":"","url":"https://api.github.com/users/arnarthor","html_url":"https://github.com/arnarthor","followers_url":"https://api.github.com/users/arnarthor/followers","following_url":"https://api.github.com/users/arnarthor/following{/other_user}","gists_url":"https://api.github.com/users/arnarthor/gists{/gist_id}","starred_url":"https://api.github.com/users/arnarthor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnarthor/subscriptions","organizations_url":"https://api.github.com/users/arnarthor/orgs","repos_url":"https://api.github.com/users/arnarthor/repos","events_url":"https://api.github.com/users/arnarthor/events{/privacy}","received_events_url":"https://api.github.com/users/arnarthor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arnarthor/bucklescript","description":"A backend for the OCaml compiler which emits JavaScript.","fork":true,"url":"https://api.github.com/repos/arnarthor/bucklescript","forks_url":"https://api.github.com/repos/arnarthor/bucklescript/forks","keys_url":"https://api.github.com/repos/arnarthor/bucklescript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arnarthor/bucklescript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arnarthor/bucklescript/teams","hooks_url":"https://api.github.com/repos/arnarthor/bucklescript/hooks","issue_events_url":"https://api.github.com/repos/arnarthor/bucklescript/issues/events{/number}","events_url":"https://api.github.com/repos/arnarthor/bucklescript/events","assignees_url":"https://api.github.com/repos/arnarthor/bucklescript/assignees{/user}","branches_url":"https://api.github.com/repos/arnarthor/bucklescript/branches{/branch}","tags_url":"https://api.github.com/repos/arnarthor/bucklescript/tags","blobs_url":"https://api.github.com/repos/arnarthor/bucklescript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arnarthor/bucklescript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arnarthor/bucklescript/git/refs{/sha}","trees_url":"https://api.github.com/repos/arnarthor/bucklescript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arnarthor/bucklescript/statuses/{sha}","languages_url":"https://api.github.com/repos/arnarthor/bucklescript/languages","stargazers_url":"https://api.github.com/repos/arnarthor/bucklescript/stargazers","contributors_url":"https://api.github.com/repos/arnarthor/bucklescript/contributors","subscribers_url":"https://api.github.com/repos/arnarthor/bucklescript/subscribers","subscription_url":"https://api.github.com/repos/arnarthor/bucklescript/subscription","commits_url":"https://api.github.com/repos/arnarthor/bucklescript/commits{/sha}","git_commits_url":"https://api.github.com/repos/arnarthor/bucklescript/git/commits{/sha}","comments_url":"https://api.github.com/repos/arnarthor/bucklescript/comments{/number}","issue_comment_url":"https://api.github.com/repos/arnarthor/bucklescript/issues/comments{/number}","contents_url":"https://api.github.com/repos/arnarthor/bucklescript/contents/{+path}","compare_url":"https://api.github.com/repos/arnarthor/bucklescript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arnarthor/bucklescript/merges","archive_url":"https://api.github.com/repos/arnarthor/bucklescript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arnarthor/bucklescript/downloads","issues_url":"https://api.github.com/repos/arnarthor/bucklescript/issues{/number}","pulls_url":"https://api.github.com/repos/arnarthor/bucklescript/pulls{/number}","milestones_url":"https://api.github.com/repos/arnarthor/bucklescript/milestones{/number}","notifications_url":"https://api.github.com/repos/arnarthor/bucklescript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arnarthor/bucklescript/labels{/name}","releases_url":"https://api.github.com/repos/arnarthor/bucklescript/releases{/id}","deployments_url":"https://api.github.com/repos/arnarthor/bucklescript/deployments","created_at":"2018-03-14T00:18:27Z","updated_at":"2018-03-14T00:24:02Z","pushed_at":"2018-03-14T00:24:00Z","git_url":"git://github.com/arnarthor/bucklescript.git","ssh_url":"git@github.com:arnarthor/bucklescript.git","clone_url":"https://github.com/arnarthor/bucklescript.git","svn_url":"https://github.com/arnarthor/bucklescript","homepage":"https://bucklescript.github.io","size":200851,"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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BuckleScript:master","ref":"master","sha":"38b7386bdafe56f3986fdbdbaa92ea2f720a5ef0","user":{"login":"BuckleScript","id":29257325,"avatar_url":"https://avatars3.githubusercontent.com/u/29257325?v=4","gravatar_id":"","url":"https://api.github.com/users/BuckleScript","html_url":"https://github.com/BuckleScript","followers_url":"https://api.github.com/users/BuckleScript/followers","following_url":"https://api.github.com/users/BuckleScript/following{/other_user}","gists_url":"https://api.github.com/users/BuckleScript/gists{/gist_id}","starred_url":"https://api.github.com/users/BuckleScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuckleScript/subscriptions","organizations_url":"https://api.github.com/users/BuckleScript/orgs","repos_url":"https://api.github.com/users/BuckleScript/repos","events_url":"https://api.github.com/users/BuckleScript/events{/privacy}","received_events_url":"https://api.github.com/users/BuckleScript/received_events","type":"Organization","site_admin":false},"repo":{"id":49159983,"name":"bucklescript","full_name":"BuckleScript/bucklescript","owner":{"login":"BuckleScript","id":29257325,"avatar_url":"https://avatars3.githubusercontent.com/u/29257325?v=4","gravatar_id":"","url":"https://api.github.com/users/BuckleScript","html_url":"https://github.com/BuckleScript","followers_url":"https://api.github.com/users/BuckleScript/followers","following_url":"https://api.github.com/users/BuckleScript/following{/other_user}","gists_url":"https://api.github.com/users/BuckleScript/gists{/gist_id}","starred_url":"https://api.github.com/users/BuckleScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuckleScript/subscriptions","organizations_url":"https://api.github.com/users/BuckleScript/orgs","repos_url":"https://api.github.com/users/BuckleScript/repos","events_url":"https://api.github.com/users/BuckleScript/events{/privacy}","received_events_url":"https://api.github.com/users/BuckleScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BuckleScript/bucklescript","description":"A backend for the OCaml compiler which emits JavaScript.","fork":false,"url":"https://api.github.com/repos/BuckleScript/bucklescript","forks_url":"https://api.github.com/repos/BuckleScript/bucklescript/forks","keys_url":"https://api.github.com/repos/BuckleScript/bucklescript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BuckleScript/bucklescript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BuckleScript/bucklescript/teams","hooks_url":"https://api.github.com/repos/BuckleScript/bucklescript/hooks","issue_events_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/events{/number}","events_url":"https://api.github.com/repos/BuckleScript/bucklescript/events","assignees_url":"https://api.github.com/repos/BuckleScript/bucklescript/assignees{/user}","branches_url":"https://api.github.com/repos/BuckleScript/bucklescript/branches{/branch}","tags_url":"https://api.github.com/repos/BuckleScript/bucklescript/tags","blobs_url":"https://api.github.com/repos/BuckleScript/bucklescript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BuckleScript/bucklescript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BuckleScript/bucklescript/git/refs{/sha}","trees_url":"https://api.github.com/repos/BuckleScript/bucklescript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BuckleScript/bucklescript/statuses/{sha}","languages_url":"https://api.github.com/repos/BuckleScript/bucklescript/languages","stargazers_url":"https://api.github.com/repos/BuckleScript/bucklescript/stargazers","contributors_url":"https://api.github.com/repos/BuckleScript/bucklescript/contributors","subscribers_url":"https://api.github.com/repos/BuckleScript/bucklescript/subscribers","subscription_url":"https://api.github.com/repos/BuckleScript/bucklescript/subscription","commits_url":"https://api.github.com/repos/BuckleScript/bucklescript/commits{/sha}","git_commits_url":"https://api.github.com/repos/BuckleScript/bucklescript/git/commits{/sha}","comments_url":"https://api.github.com/repos/BuckleScript/bucklescript/comments{/number}","issue_comment_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/comments{/number}","contents_url":"https://api.github.com/repos/BuckleScript/bucklescript/contents/{+path}","compare_url":"https://api.github.com/repos/BuckleScript/bucklescript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BuckleScript/bucklescript/merges","archive_url":"https://api.github.com/repos/BuckleScript/bucklescript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BuckleScript/bucklescript/downloads","issues_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues{/number}","pulls_url":"https://api.github.com/repos/BuckleScript/bucklescript/pulls{/number}","milestones_url":"https://api.github.com/repos/BuckleScript/bucklescript/milestones{/number}","notifications_url":"https://api.github.com/repos/BuckleScript/bucklescript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BuckleScript/bucklescript/labels{/name}","releases_url":"https://api.github.com/repos/BuckleScript/bucklescript/releases{/id}","deployments_url":"https://api.github.com/repos/BuckleScript/bucklescript/deployments","created_at":"2016-01-06T20:34:59Z","updated_at":"2018-03-14T00:21:35Z","pushed_at":"2018-03-14T00:24:01Z","git_url":"git://github.com/BuckleScript/bucklescript.git","ssh_url":"git@github.com:BuckleScript/bucklescript.git","clone_url":"https://github.com/BuckleScript/bucklescript.git","svn_url":"https://github.com/BuckleScript/bucklescript","homepage":"https://bucklescript.github.io","size":200842,"stargazers_count":3468,"watchers_count":3468,"language":"OCaml","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":220,"mirror_url":null,"archived":false,"open_issues_count":329,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":220,"open_issues":329,"watchers":3468,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622"},"html":{"href":"https://github.com/BuckleScript/bucklescript/pull/2622"},"issue":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2622"},"comments":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2622/comments"},"review_comments":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622/comments"},"review_comment":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/pulls/2622/commits"},"statuses":{"href":"https://api.github.com/repos/BuckleScript/bucklescript/statuses/6ed6ca26d97bf2ef2ee7440c9a4e19cc33a0e4a6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chenglou"}}