{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/39271552","id":39271552,"diff_hunk":"@@ -1565,3 +1568,228 @@ unittest\n                 2, \"two\",\n                 ));\n }\n+\n+/**\n+Returns true if all of the elements in $(D r1) are present in $(D r2). Otherwise,\n+returns false.\n+\n+If your parameters are forward ranges, then this function can allocate if the\n+$(D AllocateGC.yes) flag is passed. This has the benefit of being much\n+faster than the $(D AllocateGC.no) option.\n+\n+Or, if your two ranges are sortable, then passing sorted ranges will be faster\n+than the other two options. If your sorted ranges need custom equality, you\n+can override the default $(D \"a == b\") predicate. See $(D binaryFun) for more\n+details\n+\n+Non allocating forward range option: $(BIGOH r1.length * r2.length)\n+Allocating forward range option: $(BIGOH r1.length) + $(BIGOH r2.length)\n+Non allocating sorted range option: $(BIGOH min(r1.length, r2.length))\n+\n+Params:\n+    r1 = Any finite forward range\n+    r2 = Any finite forward range\n+\n+Returns:\n+    $(D bool)\n+*/\n+\n+alias AllocateGC = Flag!\"AllocateGC\";\n+\n+bool isPermutation(Range1, Range2)(Range1 r1, Range2 r2, AllocateGC allocate_gc = AllocateGC.no)\n+    if (isForwardRange!Range1 &&\n+        isForwardRange!Range2 &&\n+        !isInfinite!Range1 &&\n+        !isInfinite!Range2)\n+{","path":"std/algorithm/comparison.d","position":69,"original_position":69,"commit_id":"ae8421e61eff8c3e515b4d1b5825f58e33fcbe83","original_commit_id":"ae8421e61eff8c3e515b4d1b5825f58e33fcbe83","user":{"login":"JackStouffer","id":680068,"avatar_url":"https://avatars.githubusercontent.com/u/680068?v=3","gravatar_id":"","url":"https://api.github.com/users/JackStouffer","html_url":"https://github.com/JackStouffer","followers_url":"https://api.github.com/users/JackStouffer/followers","following_url":"https://api.github.com/users/JackStouffer/following{/other_user}","gists_url":"https://api.github.com/users/JackStouffer/gists{/gist_id}","starred_url":"https://api.github.com/users/JackStouffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackStouffer/subscriptions","organizations_url":"https://api.github.com/users/JackStouffer/orgs","repos_url":"https://api.github.com/users/JackStouffer/repos","events_url":"https://api.github.com/users/JackStouffer/events{/privacy}","received_events_url":"https://api.github.com/users/JackStouffer/received_events","type":"User","site_admin":false},"body":"I think the best solution is to document that equality for the allocating option is based upon the toHash method of the elements and cannot be changed. The non allocating option is there for situations where this is not good enough.","created_at":"2015-09-11T13:40:31Z","updated_at":"2015-09-11T13:40:31Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/3574#discussion_r39271552","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/39271552"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/3574#discussion_r39271552"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574","id":43109625,"html_url":"https://github.com/D-Programming-Language/phobos/pull/3574","diff_url":"https://github.com/D-Programming-Language/phobos/pull/3574.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/3574.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3574","number":3574,"state":"open","locked":false,"title":"Fixed Issue 12752: std.algorithm.isPermutation","user":{"login":"JackStouffer","id":680068,"avatar_url":"https://avatars.githubusercontent.com/u/680068?v=3","gravatar_id":"","url":"https://api.github.com/users/JackStouffer","html_url":"https://github.com/JackStouffer","followers_url":"https://api.github.com/users/JackStouffer/followers","following_url":"https://api.github.com/users/JackStouffer/following{/other_user}","gists_url":"https://api.github.com/users/JackStouffer/gists{/gist_id}","starred_url":"https://api.github.com/users/JackStouffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackStouffer/subscriptions","organizations_url":"https://api.github.com/users/JackStouffer/orgs","repos_url":"https://api.github.com/users/JackStouffer/repos","events_url":"https://api.github.com/users/JackStouffer/events{/privacy}","received_events_url":"https://api.github.com/users/JackStouffer/received_events","type":"User","site_admin":false},"body":"Add the template function isPermutation to determine if two ranges are permutations\r\n\r\nhttps://issues.dlang.org/show_bug.cgi?id=12752","created_at":"2015-08-22T20:24:38Z","updated_at":"2015-09-11T13:40:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e76bfabaff2e9084d8dd41cd5772a97d4ef34c3f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3574/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/ae8421e61eff8c3e515b4d1b5825f58e33fcbe83","head":{"label":"JackStouffer:issue12752","ref":"issue12752","sha":"ae8421e61eff8c3e515b4d1b5825f58e33fcbe83","user":{"login":"JackStouffer","id":680068,"avatar_url":"https://avatars.githubusercontent.com/u/680068?v=3","gravatar_id":"","url":"https://api.github.com/users/JackStouffer","html_url":"https://github.com/JackStouffer","followers_url":"https://api.github.com/users/JackStouffer/followers","following_url":"https://api.github.com/users/JackStouffer/following{/other_user}","gists_url":"https://api.github.com/users/JackStouffer/gists{/gist_id}","starred_url":"https://api.github.com/users/JackStouffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackStouffer/subscriptions","organizations_url":"https://api.github.com/users/JackStouffer/orgs","repos_url":"https://api.github.com/users/JackStouffer/repos","events_url":"https://api.github.com/users/JackStouffer/events{/privacy}","received_events_url":"https://api.github.com/users/JackStouffer/received_events","type":"User","site_admin":false},"repo":{"id":41213554,"name":"phobos","full_name":"JackStouffer/phobos","owner":{"login":"JackStouffer","id":680068,"avatar_url":"https://avatars.githubusercontent.com/u/680068?v=3","gravatar_id":"","url":"https://api.github.com/users/JackStouffer","html_url":"https://github.com/JackStouffer","followers_url":"https://api.github.com/users/JackStouffer/followers","following_url":"https://api.github.com/users/JackStouffer/following{/other_user}","gists_url":"https://api.github.com/users/JackStouffer/gists{/gist_id}","starred_url":"https://api.github.com/users/JackStouffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackStouffer/subscriptions","organizations_url":"https://api.github.com/users/JackStouffer/orgs","repos_url":"https://api.github.com/users/JackStouffer/repos","events_url":"https://api.github.com/users/JackStouffer/events{/privacy}","received_events_url":"https://api.github.com/users/JackStouffer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JackStouffer/phobos","description":"The standard library of the D programming language","fork":true,"url":"https://api.github.com/repos/JackStouffer/phobos","forks_url":"https://api.github.com/repos/JackStouffer/phobos/forks","keys_url":"https://api.github.com/repos/JackStouffer/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JackStouffer/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JackStouffer/phobos/teams","hooks_url":"https://api.github.com/repos/JackStouffer/phobos/hooks","issue_events_url":"https://api.github.com/repos/JackStouffer/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/JackStouffer/phobos/events","assignees_url":"https://api.github.com/repos/JackStouffer/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/JackStouffer/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/JackStouffer/phobos/tags","blobs_url":"https://api.github.com/repos/JackStouffer/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JackStouffer/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JackStouffer/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/JackStouffer/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JackStouffer/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/JackStouffer/phobos/languages","stargazers_url":"https://api.github.com/repos/JackStouffer/phobos/stargazers","contributors_url":"https://api.github.com/repos/JackStouffer/phobos/contributors","subscribers_url":"https://api.github.com/repos/JackStouffer/phobos/subscribers","subscription_url":"https://api.github.com/repos/JackStouffer/phobos/subscription","commits_url":"https://api.github.com/repos/JackStouffer/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/JackStouffer/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/JackStouffer/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/JackStouffer/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/JackStouffer/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/JackStouffer/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JackStouffer/phobos/merges","archive_url":"https://api.github.com/repos/JackStouffer/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JackStouffer/phobos/downloads","issues_url":"https://api.github.com/repos/JackStouffer/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/JackStouffer/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/JackStouffer/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/JackStouffer/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JackStouffer/phobos/labels{/name}","releases_url":"https://api.github.com/repos/JackStouffer/phobos/releases{/id}","created_at":"2015-08-22T15:33:19Z","updated_at":"2015-08-22T15:33:21Z","pushed_at":"2015-09-11T13:14:10Z","git_url":"git://github.com/JackStouffer/phobos.git","ssh_url":"git@github.com:JackStouffer/phobos.git","clone_url":"https://github.com/JackStouffer/phobos.git","svn_url":"https://github.com/JackStouffer/phobos","homepage":"dlang.org/phobos","size":44844,"stargazers_count":0,"watchers_count":0,"language":"D","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":"D-Programming-Language:master","ref":"master","sha":"79c35f84ca8ab72356646e6744404105cad85c57","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"D-Programming-Language/phobos","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/phobos","forks_url":"https://api.github.com/repos/D-Programming-Language/phobos/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/phobos/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/phobos/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/phobos/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/phobos/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/phobos/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/phobos/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/phobos/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/phobos/releases{/id}","created_at":"2011-01-15T07:00:06Z","updated_at":"2015-09-11T05:56:50Z","pushed_at":"2015-09-11T13:14:11Z","git_url":"git://github.com/D-Programming-Language/phobos.git","ssh_url":"git@github.com:D-Programming-Language/phobos.git","clone_url":"https://github.com/D-Programming-Language/phobos.git","svn_url":"https://github.com/D-Programming-Language/phobos","homepage":"dlang.org/phobos","size":90366,"stargazers_count":626,"watchers_count":626,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":425,"mirror_url":null,"open_issues_count":72,"forks":425,"open_issues":72,"watchers":626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/3574"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3574"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3574/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3574/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/ae8421e61eff8c3e515b4d1b5825f58e33fcbe83"}}}}