{"action":"created","comment":{"url":"https://api.github.com/repos/ramda/ramda/pulls/comments/29912195","id":29912195,"diff_hunk":"@@ -4705,6 +4707,42 @@\n     R.gte = op(function _gte(a, b) { return a >= b; });\n \n \n+    function createMaxMin(comparator, initialVal) {\n+        return function(list) {\n+            if (arguments.length === 0) {\n+                throw noArgsException();\n+            }\n+            var idx = -1, winner = initialVal, computed;\n+            while (++idx < list.length) {\n+                computed = +list[idx];\n+                if (comparator(computed, winner)) {\n+                    winner = computed;\n+                }\n+            }\n+            return winner;\n+        };\n+    }\n+\n+    function createMaxMinWith(comparator) {\n+        return function(valueComputer, list) {\n+            if (!(list && list.length > 0)) {\n+                return;","path":"ramda.js","position":43,"original_position":43,"commit_id":"54716cd6e45751fb6bd4d3b5d58602c973d741b2","original_commit_id":"54716cd6e45751fb6bd4d3b5d58602c973d741b2","user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"body":"On the coerce note I was pointing out that maxBy/minBy don't coerce but min/max do.","created_at":"2015-05-08T01:49:52Z","updated_at":"2015-05-08T01:49:52Z","html_url":"https://github.com/ramda/ramda/pull/456#discussion_r29912195","pull_request_url":"https://api.github.com/repos/ramda/ramda/pulls/456","_links":{"self":{"href":"https://api.github.com/repos/ramda/ramda/pulls/comments/29912195"},"html":{"href":"https://github.com/ramda/ramda/pull/456#discussion_r29912195"},"pull_request":{"href":"https://api.github.com/repos/ramda/ramda/pulls/456"}}},"pull_request":{"url":"https://api.github.com/repos/ramda/ramda/pulls/456","id":22984392,"html_url":"https://github.com/ramda/ramda/pull/456","diff_url":"https://github.com/ramda/ramda/pull/456.diff","patch_url":"https://github.com/ramda/ramda/pull/456.patch","issue_url":"https://api.github.com/repos/ramda/ramda/issues/456","number":456,"state":"closed","locked":false,"title":"Abstract max and min, maxWith and minWith to helpers","user":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"body":"Obviously slight (probably inlined function call) perf hit but it's going to be much better than it was last revision and kills some redundancy. `min` and `max` may also perform better for some edge cases with a slow `valueOf`","created_at":"2014-10-19T19:23:51Z","updated_at":"2015-05-08T01:49:52Z","closed_at":"2014-10-19T21:08:33Z","merged_at":"2014-10-19T21:08:33Z","merge_commit_sha":"233cff7f7242624e50c888bc7f486ed51a6b79e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ramda/ramda/pulls/456/commits","review_comments_url":"https://api.github.com/repos/ramda/ramda/pulls/456/comments","review_comment_url":"https://api.github.com/repos/ramda/ramda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ramda/ramda/issues/456/comments","statuses_url":"https://api.github.com/repos/ramda/ramda/statuses/54716cd6e45751fb6bd4d3b5d58602c973d741b2","head":{"label":"megawac:max-min-abs","ref":"max-min-abs","sha":"54716cd6e45751fb6bd4d3b5d58602c973d741b2","user":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"repo":{"id":21077108,"name":"ramda","full_name":"megawac/ramda","owner":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/megawac/ramda","description":"","fork":true,"url":"https://api.github.com/repos/megawac/ramda","forks_url":"https://api.github.com/repos/megawac/ramda/forks","keys_url":"https://api.github.com/repos/megawac/ramda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/megawac/ramda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/megawac/ramda/teams","hooks_url":"https://api.github.com/repos/megawac/ramda/hooks","issue_events_url":"https://api.github.com/repos/megawac/ramda/issues/events{/number}","events_url":"https://api.github.com/repos/megawac/ramda/events","assignees_url":"https://api.github.com/repos/megawac/ramda/assignees{/user}","branches_url":"https://api.github.com/repos/megawac/ramda/branches{/branch}","tags_url":"https://api.github.com/repos/megawac/ramda/tags","blobs_url":"https://api.github.com/repos/megawac/ramda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/megawac/ramda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/megawac/ramda/git/refs{/sha}","trees_url":"https://api.github.com/repos/megawac/ramda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/megawac/ramda/statuses/{sha}","languages_url":"https://api.github.com/repos/megawac/ramda/languages","stargazers_url":"https://api.github.com/repos/megawac/ramda/stargazers","contributors_url":"https://api.github.com/repos/megawac/ramda/contributors","subscribers_url":"https://api.github.com/repos/megawac/ramda/subscribers","subscription_url":"https://api.github.com/repos/megawac/ramda/subscription","commits_url":"https://api.github.com/repos/megawac/ramda/commits{/sha}","git_commits_url":"https://api.github.com/repos/megawac/ramda/git/commits{/sha}","comments_url":"https://api.github.com/repos/megawac/ramda/comments{/number}","issue_comment_url":"https://api.github.com/repos/megawac/ramda/issues/comments{/number}","contents_url":"https://api.github.com/repos/megawac/ramda/contents/{+path}","compare_url":"https://api.github.com/repos/megawac/ramda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/megawac/ramda/merges","archive_url":"https://api.github.com/repos/megawac/ramda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/megawac/ramda/downloads","issues_url":"https://api.github.com/repos/megawac/ramda/issues{/number}","pulls_url":"https://api.github.com/repos/megawac/ramda/pulls{/number}","milestones_url":"https://api.github.com/repos/megawac/ramda/milestones{/number}","notifications_url":"https://api.github.com/repos/megawac/ramda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/megawac/ramda/labels{/name}","releases_url":"https://api.github.com/repos/megawac/ramda/releases{/id}","created_at":"2014-06-21T19:33:34Z","updated_at":"2015-03-13T00:48:36Z","pushed_at":"2015-03-20T04:22:38Z","git_url":"git://github.com/megawac/ramda.git","ssh_url":"git@github.com:megawac/ramda.git","clone_url":"https://github.com/megawac/ramda.git","svn_url":"https://github.com/megawac/ramda","homepage":null,"size":4159,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ramda:master","ref":"master","sha":"f8d5f82a9632c75ef7f97f16ae25546bd39ca709","user":{"login":"ramda","id":5298359,"avatar_url":"https://avatars.githubusercontent.com/u/5298359?v=3","gravatar_id":"","url":"https://api.github.com/users/ramda","html_url":"https://github.com/ramda","followers_url":"https://api.github.com/users/ramda/followers","following_url":"https://api.github.com/users/ramda/following{/other_user}","gists_url":"https://api.github.com/users/ramda/gists{/gist_id}","starred_url":"https://api.github.com/users/ramda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramda/subscriptions","organizations_url":"https://api.github.com/users/ramda/orgs","repos_url":"https://api.github.com/users/ramda/repos","events_url":"https://api.github.com/users/ramda/events{/privacy}","received_events_url":"https://api.github.com/users/ramda/received_events","type":"Organization","site_admin":false},"repo":{"id":10851820,"name":"ramda","full_name":"ramda/ramda","owner":{"login":"ramda","id":5298359,"avatar_url":"https://avatars.githubusercontent.com/u/5298359?v=3","gravatar_id":"","url":"https://api.github.com/users/ramda","html_url":"https://github.com/ramda","followers_url":"https://api.github.com/users/ramda/followers","following_url":"https://api.github.com/users/ramda/following{/other_user}","gists_url":"https://api.github.com/users/ramda/gists{/gist_id}","starred_url":"https://api.github.com/users/ramda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramda/subscriptions","organizations_url":"https://api.github.com/users/ramda/orgs","repos_url":"https://api.github.com/users/ramda/repos","events_url":"https://api.github.com/users/ramda/events{/privacy}","received_events_url":"https://api.github.com/users/ramda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ramda/ramda","description":":ram: Practical functional Javascript","fork":false,"url":"https://api.github.com/repos/ramda/ramda","forks_url":"https://api.github.com/repos/ramda/ramda/forks","keys_url":"https://api.github.com/repos/ramda/ramda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramda/ramda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramda/ramda/teams","hooks_url":"https://api.github.com/repos/ramda/ramda/hooks","issue_events_url":"https://api.github.com/repos/ramda/ramda/issues/events{/number}","events_url":"https://api.github.com/repos/ramda/ramda/events","assignees_url":"https://api.github.com/repos/ramda/ramda/assignees{/user}","branches_url":"https://api.github.com/repos/ramda/ramda/branches{/branch}","tags_url":"https://api.github.com/repos/ramda/ramda/tags","blobs_url":"https://api.github.com/repos/ramda/ramda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramda/ramda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramda/ramda/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramda/ramda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramda/ramda/statuses/{sha}","languages_url":"https://api.github.com/repos/ramda/ramda/languages","stargazers_url":"https://api.github.com/repos/ramda/ramda/stargazers","contributors_url":"https://api.github.com/repos/ramda/ramda/contributors","subscribers_url":"https://api.github.com/repos/ramda/ramda/subscribers","subscription_url":"https://api.github.com/repos/ramda/ramda/subscription","commits_url":"https://api.github.com/repos/ramda/ramda/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramda/ramda/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramda/ramda/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramda/ramda/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramda/ramda/contents/{+path}","compare_url":"https://api.github.com/repos/ramda/ramda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramda/ramda/merges","archive_url":"https://api.github.com/repos/ramda/ramda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramda/ramda/downloads","issues_url":"https://api.github.com/repos/ramda/ramda/issues{/number}","pulls_url":"https://api.github.com/repos/ramda/ramda/pulls{/number}","milestones_url":"https://api.github.com/repos/ramda/ramda/milestones{/number}","notifications_url":"https://api.github.com/repos/ramda/ramda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramda/ramda/labels{/name}","releases_url":"https://api.github.com/repos/ramda/ramda/releases{/id}","created_at":"2013-06-21T20:32:35Z","updated_at":"2015-05-07T23:00:18Z","pushed_at":"2015-05-07T01:26:40Z","git_url":"git://github.com/ramda/ramda.git","ssh_url":"git@github.com:ramda/ramda.git","clone_url":"https://github.com/ramda/ramda.git","svn_url":"https://github.com/ramda/ramda","homepage":"http://ramdajs.com","size":11534,"stargazers_count":2005,"watchers_count":2005,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":155,"mirror_url":null,"open_issues_count":49,"forks":155,"open_issues":49,"watchers":2005,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ramda/ramda/pulls/456"},"html":{"href":"https://github.com/ramda/ramda/pull/456"},"issue":{"href":"https://api.github.com/repos/ramda/ramda/issues/456"},"comments":{"href":"https://api.github.com/repos/ramda/ramda/issues/456/comments"},"review_comments":{"href":"https://api.github.com/repos/ramda/ramda/pulls/456/comments"},"review_comment":{"href":"https://api.github.com/repos/ramda/ramda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ramda/ramda/pulls/456/commits"},"statuses":{"href":"https://api.github.com/repos/ramda/ramda/statuses/54716cd6e45751fb6bd4d3b5d58602c973d741b2"}}}}