{"action":"created","comment":{"url":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments/54333597","id":54333597,"diff_hunk":"@@ -235,6 +235,22 @@ public fun <T> List<T>.binarySearch(fromIndex: Int = 0, toIndex: Int = size, com\n }\n \n /**\n+ * Returns the elements from the list from indexes specified in range.\n+ */\n+operator fun <T> List<T>.get(indexesRange: IntRange): List<T> =\n+        if(indexesRange.first < 0 || indexesRange.last > lastIndex)\n+            throw IndexOutOfBoundsException()","path":"libraries/stdlib/src/kotlin/collections/Collections.kt","position":8,"original_position":8,"commit_id":"c456e9b8b966304eaf4345cbd56ecd0e81eb66a6","original_commit_id":"c456e9b8b966304eaf4345cbd56ecd0e81eb66a6","user":{"login":"cy6erGn0m","id":762598,"avatar_url":"https://avatars.githubusercontent.com/u/762598?v=3","gravatar_id":"","url":"https://api.github.com/users/cy6erGn0m","html_url":"https://github.com/cy6erGn0m","followers_url":"https://api.github.com/users/cy6erGn0m/followers","following_url":"https://api.github.com/users/cy6erGn0m/following{/other_user}","gists_url":"https://api.github.com/users/cy6erGn0m/gists{/gist_id}","starred_url":"https://api.github.com/users/cy6erGn0m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cy6erGn0m/subscriptions","organizations_url":"https://api.github.com/users/cy6erGn0m/orgs","repos_url":"https://api.github.com/users/cy6erGn0m/repos","events_url":"https://api.github.com/users/cy6erGn0m/events{/privacy}","received_events_url":"https://api.github.com/users/cy6erGn0m/received_events","type":"User","site_admin":false},"body":"It should be more debug information: exact range bounds and the list size","created_at":"2016-02-27T13:52:37Z","updated_at":"2016-02-27T13:52:37Z","html_url":"https://github.com/JetBrains/kotlin/pull/827#discussion_r54333597","pull_request_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/827","_links":{"self":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments/54333597"},"html":{"href":"https://github.com/JetBrains/kotlin/pull/827#discussion_r54333597"},"pull_request":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/827"}}},"pull_request":{"url":"https://api.github.com/repos/JetBrains/kotlin/pulls/827","id":60945929,"html_url":"https://github.com/JetBrains/kotlin/pull/827","diff_url":"https://github.com/JetBrains/kotlin/pull/827.diff","patch_url":"https://github.com/JetBrains/kotlin/pull/827.patch","issue_url":"https://api.github.com/repos/JetBrains/kotlin/issues/827","number":827,"state":"open","locked":false,"title":"Add range get from list and list multiplication","user":{"login":"MarcinMoskala","id":6850787,"avatar_url":"https://avatars.githubusercontent.com/u/6850787?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinMoskala","html_url":"https://github.com/MarcinMoskala","followers_url":"https://api.github.com/users/MarcinMoskala/followers","following_url":"https://api.github.com/users/MarcinMoskala/following{/other_user}","gists_url":"https://api.github.com/users/MarcinMoskala/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinMoskala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinMoskala/subscriptions","organizations_url":"https://api.github.com/users/MarcinMoskala/orgs","repos_url":"https://api.github.com/users/MarcinMoskala/repos","events_url":"https://api.github.com/users/MarcinMoskala/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinMoskala/received_events","type":"User","site_admin":false},"body":"There are to 2 handy features to get elements from list like:\r\nlist[0, 1, 2, 5] or list[2..4]","created_at":"2016-02-27T10:41:43Z","updated_at":"2016-02-27T13:52:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54b46476e27181b0497debaad95201a57cd45270","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/827/commits","review_comments_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/827/comments","review_comment_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JetBrains/kotlin/issues/827/comments","statuses_url":"https://api.github.com/repos/JetBrains/kotlin/statuses/c456e9b8b966304eaf4345cbd56ecd0e81eb66a6","head":{"label":"MarcinMoskala:rr/stdib/list-python-like-features","ref":"rr/stdib/list-python-like-features","sha":"c456e9b8b966304eaf4345cbd56ecd0e81eb66a6","user":{"login":"MarcinMoskala","id":6850787,"avatar_url":"https://avatars.githubusercontent.com/u/6850787?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinMoskala","html_url":"https://github.com/MarcinMoskala","followers_url":"https://api.github.com/users/MarcinMoskala/followers","following_url":"https://api.github.com/users/MarcinMoskala/following{/other_user}","gists_url":"https://api.github.com/users/MarcinMoskala/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinMoskala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinMoskala/subscriptions","organizations_url":"https://api.github.com/users/MarcinMoskala/orgs","repos_url":"https://api.github.com/users/MarcinMoskala/repos","events_url":"https://api.github.com/users/MarcinMoskala/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinMoskala/received_events","type":"User","site_admin":false},"repo":{"id":52531672,"name":"kotlin","full_name":"MarcinMoskala/kotlin","owner":{"login":"MarcinMoskala","id":6850787,"avatar_url":"https://avatars.githubusercontent.com/u/6850787?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinMoskala","html_url":"https://github.com/MarcinMoskala","followers_url":"https://api.github.com/users/MarcinMoskala/followers","following_url":"https://api.github.com/users/MarcinMoskala/following{/other_user}","gists_url":"https://api.github.com/users/MarcinMoskala/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinMoskala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinMoskala/subscriptions","organizations_url":"https://api.github.com/users/MarcinMoskala/orgs","repos_url":"https://api.github.com/users/MarcinMoskala/repos","events_url":"https://api.github.com/users/MarcinMoskala/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinMoskala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarcinMoskala/kotlin","description":"The Kotlin Programming Language","fork":true,"url":"https://api.github.com/repos/MarcinMoskala/kotlin","forks_url":"https://api.github.com/repos/MarcinMoskala/kotlin/forks","keys_url":"https://api.github.com/repos/MarcinMoskala/kotlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarcinMoskala/kotlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarcinMoskala/kotlin/teams","hooks_url":"https://api.github.com/repos/MarcinMoskala/kotlin/hooks","issue_events_url":"https://api.github.com/repos/MarcinMoskala/kotlin/issues/events{/number}","events_url":"https://api.github.com/repos/MarcinMoskala/kotlin/events","assignees_url":"https://api.github.com/repos/MarcinMoskala/kotlin/assignees{/user}","branches_url":"https://api.github.com/repos/MarcinMoskala/kotlin/branches{/branch}","tags_url":"https://api.github.com/repos/MarcinMoskala/kotlin/tags","blobs_url":"https://api.github.com/repos/MarcinMoskala/kotlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarcinMoskala/kotlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarcinMoskala/kotlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarcinMoskala/kotlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarcinMoskala/kotlin/statuses/{sha}","languages_url":"https://api.github.com/repos/MarcinMoskala/kotlin/languages","stargazers_url":"https://api.github.com/repos/MarcinMoskala/kotlin/stargazers","contributors_url":"https://api.github.com/repos/MarcinMoskala/kotlin/contributors","subscribers_url":"https://api.github.com/repos/MarcinMoskala/kotlin/subscribers","subscription_url":"https://api.github.com/repos/MarcinMoskala/kotlin/subscription","commits_url":"https://api.github.com/repos/MarcinMoskala/kotlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarcinMoskala/kotlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarcinMoskala/kotlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarcinMoskala/kotlin/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarcinMoskala/kotlin/contents/{+path}","compare_url":"https://api.github.com/repos/MarcinMoskala/kotlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarcinMoskala/kotlin/merges","archive_url":"https://api.github.com/repos/MarcinMoskala/kotlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarcinMoskala/kotlin/downloads","issues_url":"https://api.github.com/repos/MarcinMoskala/kotlin/issues{/number}","pulls_url":"https://api.github.com/repos/MarcinMoskala/kotlin/pulls{/number}","milestones_url":"https://api.github.com/repos/MarcinMoskala/kotlin/milestones{/number}","notifications_url":"https://api.github.com/repos/MarcinMoskala/kotlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarcinMoskala/kotlin/labels{/name}","releases_url":"https://api.github.com/repos/MarcinMoskala/kotlin/releases{/id}","deployments_url":"https://api.github.com/repos/MarcinMoskala/kotlin/deployments","created_at":"2016-02-25T14:36:24Z","updated_at":"2016-02-25T14:36:55Z","pushed_at":"2016-02-27T11:33:56Z","git_url":"git://github.com/MarcinMoskala/kotlin.git","ssh_url":"git@github.com:MarcinMoskala/kotlin.git","clone_url":"https://github.com/MarcinMoskala/kotlin.git","svn_url":"https://github.com/MarcinMoskala/kotlin","homepage":"http://kotlinlang.org/","size":289986,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JetBrains:master","ref":"master","sha":"06af22b2c19a41fb2bd6c18e16f445475c866acb","user":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars.githubusercontent.com/u/878437?v=3","gravatar_id":"","url":"https://api.github.com/users/JetBrains","html_url":"https://github.com/JetBrains","followers_url":"https://api.github.com/users/JetBrains/followers","following_url":"https://api.github.com/users/JetBrains/following{/other_user}","gists_url":"https://api.github.com/users/JetBrains/gists{/gist_id}","starred_url":"https://api.github.com/users/JetBrains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetBrains/subscriptions","organizations_url":"https://api.github.com/users/JetBrains/orgs","repos_url":"https://api.github.com/users/JetBrains/repos","events_url":"https://api.github.com/users/JetBrains/events{/privacy}","received_events_url":"https://api.github.com/users/JetBrains/received_events","type":"Organization","site_admin":false},"repo":{"id":3432266,"name":"kotlin","full_name":"JetBrains/kotlin","owner":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars.githubusercontent.com/u/878437?v=3","gravatar_id":"","url":"https://api.github.com/users/JetBrains","html_url":"https://github.com/JetBrains","followers_url":"https://api.github.com/users/JetBrains/followers","following_url":"https://api.github.com/users/JetBrains/following{/other_user}","gists_url":"https://api.github.com/users/JetBrains/gists{/gist_id}","starred_url":"https://api.github.com/users/JetBrains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetBrains/subscriptions","organizations_url":"https://api.github.com/users/JetBrains/orgs","repos_url":"https://api.github.com/users/JetBrains/repos","events_url":"https://api.github.com/users/JetBrains/events{/privacy}","received_events_url":"https://api.github.com/users/JetBrains/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JetBrains/kotlin","description":"The Kotlin Programming Language","fork":false,"url":"https://api.github.com/repos/JetBrains/kotlin","forks_url":"https://api.github.com/repos/JetBrains/kotlin/forks","keys_url":"https://api.github.com/repos/JetBrains/kotlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JetBrains/kotlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JetBrains/kotlin/teams","hooks_url":"https://api.github.com/repos/JetBrains/kotlin/hooks","issue_events_url":"https://api.github.com/repos/JetBrains/kotlin/issues/events{/number}","events_url":"https://api.github.com/repos/JetBrains/kotlin/events","assignees_url":"https://api.github.com/repos/JetBrains/kotlin/assignees{/user}","branches_url":"https://api.github.com/repos/JetBrains/kotlin/branches{/branch}","tags_url":"https://api.github.com/repos/JetBrains/kotlin/tags","blobs_url":"https://api.github.com/repos/JetBrains/kotlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JetBrains/kotlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JetBrains/kotlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/JetBrains/kotlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JetBrains/kotlin/statuses/{sha}","languages_url":"https://api.github.com/repos/JetBrains/kotlin/languages","stargazers_url":"https://api.github.com/repos/JetBrains/kotlin/stargazers","contributors_url":"https://api.github.com/repos/JetBrains/kotlin/contributors","subscribers_url":"https://api.github.com/repos/JetBrains/kotlin/subscribers","subscription_url":"https://api.github.com/repos/JetBrains/kotlin/subscription","commits_url":"https://api.github.com/repos/JetBrains/kotlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/JetBrains/kotlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/JetBrains/kotlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/JetBrains/kotlin/issues/comments{/number}","contents_url":"https://api.github.com/repos/JetBrains/kotlin/contents/{+path}","compare_url":"https://api.github.com/repos/JetBrains/kotlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JetBrains/kotlin/merges","archive_url":"https://api.github.com/repos/JetBrains/kotlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JetBrains/kotlin/downloads","issues_url":"https://api.github.com/repos/JetBrains/kotlin/issues{/number}","pulls_url":"https://api.github.com/repos/JetBrains/kotlin/pulls{/number}","milestones_url":"https://api.github.com/repos/JetBrains/kotlin/milestones{/number}","notifications_url":"https://api.github.com/repos/JetBrains/kotlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JetBrains/kotlin/labels{/name}","releases_url":"https://api.github.com/repos/JetBrains/kotlin/releases{/id}","deployments_url":"https://api.github.com/repos/JetBrains/kotlin/deployments","created_at":"2012-02-13T17:29:58Z","updated_at":"2016-02-27T12:39:01Z","pushed_at":"2016-02-27T13:47:41Z","git_url":"git://github.com/JetBrains/kotlin.git","ssh_url":"git@github.com:JetBrains/kotlin.git","clone_url":"https://github.com/JetBrains/kotlin.git","svn_url":"https://github.com/JetBrains/kotlin","homepage":"http://kotlinlang.org/","size":298243,"stargazers_count":4315,"watchers_count":4315,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":460,"mirror_url":null,"open_issues_count":28,"forks":460,"open_issues":28,"watchers":4315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/827"},"html":{"href":"https://github.com/JetBrains/kotlin/pull/827"},"issue":{"href":"https://api.github.com/repos/JetBrains/kotlin/issues/827"},"comments":{"href":"https://api.github.com/repos/JetBrains/kotlin/issues/827/comments"},"review_comments":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/827/comments"},"review_comment":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/827/commits"},"statuses":{"href":"https://api.github.com/repos/JetBrains/kotlin/statuses/c456e9b8b966304eaf4345cbd56ecd0e81eb66a6"}}}}