{"action":"created","comment":{"url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/comments/32185869","id":32185869,"diff_hunk":"@@ -793,6 +818,18 @@ let remove x s = Concrete.remove Pervasives.compare x s\n \n let iter f s = Concrete.iter f s\n \n+let at_exn i s = Concrete.at_exn i s\n+\n+(*$T\n+  at_exn 0 (of_list [1;2]) == 1\n+  at_exn 1 (of_list [1;2]) == 2","path":"src/batSet.ml","position":66,"original_position":66,"commit_id":"7d93a2b31556463f01cb2226568cba08a848824f","original_commit_id":"7d93a2b31556463f01cb2226568cba08a848824f","user":{"login":"gasche","id":426238,"avatar_url":"https://avatars.githubusercontent.com/u/426238?v=3","gravatar_id":"","url":"https://api.github.com/users/gasche","html_url":"https://github.com/gasche","followers_url":"https://api.github.com/users/gasche/followers","following_url":"https://api.github.com/users/gasche/following{/other_user}","gists_url":"https://api.github.com/users/gasche/gists{/gist_id}","starred_url":"https://api.github.com/users/gasche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasche/subscriptions","organizations_url":"https://api.github.com/users/gasche/orgs","repos_url":"https://api.github.com/users/gasche/repos","events_url":"https://api.github.com/users/gasche/events{/privacy}","received_events_url":"https://api.github.com/users/gasche/received_events","type":"User","site_admin":false},"body":"I think you could have a test with a bit more elements in the set -- for example with 5 elements, picking an element that is neither the first nor the last to avoid edge cases.","created_at":"2015-06-11T02:39:21Z","updated_at":"2015-06-11T02:39:21Z","html_url":"https://github.com/ocaml-batteries-team/batteries-included/pull/616#discussion_r32185869","pull_request_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616","_links":{"self":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/comments/32185869"},"html":{"href":"https://github.com/ocaml-batteries-team/batteries-included/pull/616#discussion_r32185869"},"pull_request":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616"}}},"pull_request":{"url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616","id":37362882,"html_url":"https://github.com/ocaml-batteries-team/batteries-included/pull/616","diff_url":"https://github.com/ocaml-batteries-team/batteries-included/pull/616.diff","patch_url":"https://github.com/ocaml-batteries-team/batteries-included/pull/616.patch","issue_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues/616","number":616,"state":"open","locked":false,"title":"Set.at_exn","user":{"login":"UnixJunkie","id":737920,"avatar_url":"https://avatars.githubusercontent.com/u/737920?v=3","gravatar_id":"","url":"https://api.github.com/users/UnixJunkie","html_url":"https://github.com/UnixJunkie","followers_url":"https://api.github.com/users/UnixJunkie/followers","following_url":"https://api.github.com/users/UnixJunkie/following{/other_user}","gists_url":"https://api.github.com/users/UnixJunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/UnixJunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnixJunkie/subscriptions","organizations_url":"https://api.github.com/users/UnixJunkie/orgs","repos_url":"https://api.github.com/users/UnixJunkie/repos","events_url":"https://api.github.com/users/UnixJunkie/events{/privacy}","received_events_url":"https://api.github.com/users/UnixJunkie/received_events","type":"User","site_admin":false},"body":"If it is accepted, I can propose the version not throwing exceptions on top of it soon.\r\n","created_at":"2015-06-10T14:14:44Z","updated_at":"2015-06-11T02:39:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bcecc135c9eb029ca062140680d42e6b31d06b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616/commits","review_comments_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616/comments","review_comment_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues/616/comments","statuses_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/statuses/7d93a2b31556463f01cb2226568cba08a848824f","head":{"label":"UnixJunkie:set_at_exn","ref":"set_at_exn","sha":"7d93a2b31556463f01cb2226568cba08a848824f","user":{"login":"UnixJunkie","id":737920,"avatar_url":"https://avatars.githubusercontent.com/u/737920?v=3","gravatar_id":"","url":"https://api.github.com/users/UnixJunkie","html_url":"https://github.com/UnixJunkie","followers_url":"https://api.github.com/users/UnixJunkie/followers","following_url":"https://api.github.com/users/UnixJunkie/following{/other_user}","gists_url":"https://api.github.com/users/UnixJunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/UnixJunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnixJunkie/subscriptions","organizations_url":"https://api.github.com/users/UnixJunkie/orgs","repos_url":"https://api.github.com/users/UnixJunkie/repos","events_url":"https://api.github.com/users/UnixJunkie/events{/privacy}","received_events_url":"https://api.github.com/users/UnixJunkie/received_events","type":"User","site_admin":false},"repo":{"id":10167294,"name":"batteries-included","full_name":"UnixJunkie/batteries-included","owner":{"login":"UnixJunkie","id":737920,"avatar_url":"https://avatars.githubusercontent.com/u/737920?v=3","gravatar_id":"","url":"https://api.github.com/users/UnixJunkie","html_url":"https://github.com/UnixJunkie","followers_url":"https://api.github.com/users/UnixJunkie/followers","following_url":"https://api.github.com/users/UnixJunkie/following{/other_user}","gists_url":"https://api.github.com/users/UnixJunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/UnixJunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnixJunkie/subscriptions","organizations_url":"https://api.github.com/users/UnixJunkie/orgs","repos_url":"https://api.github.com/users/UnixJunkie/repos","events_url":"https://api.github.com/users/UnixJunkie/events{/privacy}","received_events_url":"https://api.github.com/users/UnixJunkie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/UnixJunkie/batteries-included","description":"Batteries Included project","fork":true,"url":"https://api.github.com/repos/UnixJunkie/batteries-included","forks_url":"https://api.github.com/repos/UnixJunkie/batteries-included/forks","keys_url":"https://api.github.com/repos/UnixJunkie/batteries-included/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UnixJunkie/batteries-included/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UnixJunkie/batteries-included/teams","hooks_url":"https://api.github.com/repos/UnixJunkie/batteries-included/hooks","issue_events_url":"https://api.github.com/repos/UnixJunkie/batteries-included/issues/events{/number}","events_url":"https://api.github.com/repos/UnixJunkie/batteries-included/events","assignees_url":"https://api.github.com/repos/UnixJunkie/batteries-included/assignees{/user}","branches_url":"https://api.github.com/repos/UnixJunkie/batteries-included/branches{/branch}","tags_url":"https://api.github.com/repos/UnixJunkie/batteries-included/tags","blobs_url":"https://api.github.com/repos/UnixJunkie/batteries-included/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UnixJunkie/batteries-included/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UnixJunkie/batteries-included/git/refs{/sha}","trees_url":"https://api.github.com/repos/UnixJunkie/batteries-included/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UnixJunkie/batteries-included/statuses/{sha}","languages_url":"https://api.github.com/repos/UnixJunkie/batteries-included/languages","stargazers_url":"https://api.github.com/repos/UnixJunkie/batteries-included/stargazers","contributors_url":"https://api.github.com/repos/UnixJunkie/batteries-included/contributors","subscribers_url":"https://api.github.com/repos/UnixJunkie/batteries-included/subscribers","subscription_url":"https://api.github.com/repos/UnixJunkie/batteries-included/subscription","commits_url":"https://api.github.com/repos/UnixJunkie/batteries-included/commits{/sha}","git_commits_url":"https://api.github.com/repos/UnixJunkie/batteries-included/git/commits{/sha}","comments_url":"https://api.github.com/repos/UnixJunkie/batteries-included/comments{/number}","issue_comment_url":"https://api.github.com/repos/UnixJunkie/batteries-included/issues/comments{/number}","contents_url":"https://api.github.com/repos/UnixJunkie/batteries-included/contents/{+path}","compare_url":"https://api.github.com/repos/UnixJunkie/batteries-included/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UnixJunkie/batteries-included/merges","archive_url":"https://api.github.com/repos/UnixJunkie/batteries-included/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UnixJunkie/batteries-included/downloads","issues_url":"https://api.github.com/repos/UnixJunkie/batteries-included/issues{/number}","pulls_url":"https://api.github.com/repos/UnixJunkie/batteries-included/pulls{/number}","milestones_url":"https://api.github.com/repos/UnixJunkie/batteries-included/milestones{/number}","notifications_url":"https://api.github.com/repos/UnixJunkie/batteries-included/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UnixJunkie/batteries-included/labels{/name}","releases_url":"https://api.github.com/repos/UnixJunkie/batteries-included/releases{/id}","created_at":"2013-05-20T06:32:00Z","updated_at":"2014-03-06T01:35:57Z","pushed_at":"2015-06-10T14:13:34Z","git_url":"git://github.com/UnixJunkie/batteries-included.git","ssh_url":"git@github.com:UnixJunkie/batteries-included.git","clone_url":"https://github.com/UnixJunkie/batteries-included.git","svn_url":"https://github.com/UnixJunkie/batteries-included","homepage":"http://ocaml-batteries-team.github.com/batteries-included/hdoc2/","size":17654,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ocaml-batteries-team:master","ref":"master","sha":"4534fefbc42ec31158dbfdd5f0816a4cea710ae7","user":{"login":"ocaml-batteries-team","id":333656,"avatar_url":"https://avatars.githubusercontent.com/u/333656?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml-batteries-team","html_url":"https://github.com/ocaml-batteries-team","followers_url":"https://api.github.com/users/ocaml-batteries-team/followers","following_url":"https://api.github.com/users/ocaml-batteries-team/following{/other_user}","gists_url":"https://api.github.com/users/ocaml-batteries-team/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml-batteries-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml-batteries-team/subscriptions","organizations_url":"https://api.github.com/users/ocaml-batteries-team/orgs","repos_url":"https://api.github.com/users/ocaml-batteries-team/repos","events_url":"https://api.github.com/users/ocaml-batteries-team/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml-batteries-team/received_events","type":"Organization","site_admin":false},"repo":{"id":374929,"name":"batteries-included","full_name":"ocaml-batteries-team/batteries-included","owner":{"login":"ocaml-batteries-team","id":333656,"avatar_url":"https://avatars.githubusercontent.com/u/333656?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml-batteries-team","html_url":"https://github.com/ocaml-batteries-team","followers_url":"https://api.github.com/users/ocaml-batteries-team/followers","following_url":"https://api.github.com/users/ocaml-batteries-team/following{/other_user}","gists_url":"https://api.github.com/users/ocaml-batteries-team/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml-batteries-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml-batteries-team/subscriptions","organizations_url":"https://api.github.com/users/ocaml-batteries-team/orgs","repos_url":"https://api.github.com/users/ocaml-batteries-team/repos","events_url":"https://api.github.com/users/ocaml-batteries-team/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml-batteries-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml-batteries-team/batteries-included","description":"Batteries Included project","fork":false,"url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included","forks_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/forks","keys_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/teams","hooks_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/hooks","issue_events_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/events","assignees_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/tags","blobs_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/languages","stargazers_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/stargazers","contributors_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/contributors","subscribers_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/subscribers","subscription_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/subscription","commits_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/merges","archive_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/downloads","issues_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/labels{/name}","releases_url":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/releases{/id}","created_at":"2009-11-16T17:19:48Z","updated_at":"2015-05-27T21:21:46Z","pushed_at":"2015-06-10T14:14:44Z","git_url":"git://github.com/ocaml-batteries-team/batteries-included.git","ssh_url":"git@github.com:ocaml-batteries-team/batteries-included.git","clone_url":"https://github.com/ocaml-batteries-team/batteries-included.git","svn_url":"https://github.com/ocaml-batteries-team/batteries-included","homepage":"http://ocaml-batteries-team.github.com/batteries-included/hdoc2/","size":23507,"stargazers_count":215,"watchers_count":215,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":66,"mirror_url":null,"open_issues_count":72,"forks":66,"open_issues":72,"watchers":215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616"},"html":{"href":"https://github.com/ocaml-batteries-team/batteries-included/pull/616"},"issue":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues/616"},"comments":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/issues/616/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/pulls/616/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml-batteries-team/batteries-included/statuses/7d93a2b31556463f01cb2226568cba08a848824f"}}}}