{"action":"created","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/1397","labels_url":"https://api.github.com/repos/manastech/crystal/issues/1397/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/1397/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/1397/events","html_url":"https://github.com/manastech/crystal/pull/1397","id":105118385,"number":1397,"title":"Enumerable.min & max accept a default value.","user":{"login":"technorama","id":51043,"avatar_url":"https://avatars.githubusercontent.com/u/51043?v=3","gravatar_id":"","url":"https://api.github.com/users/technorama","html_url":"https://github.com/technorama","followers_url":"https://api.github.com/users/technorama/followers","following_url":"https://api.github.com/users/technorama/following{/other_user}","gists_url":"https://api.github.com/users/technorama/gists{/gist_id}","starred_url":"https://api.github.com/users/technorama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technorama/subscriptions","organizations_url":"https://api.github.com/users/technorama/orgs","repos_url":"https://api.github.com/users/technorama/repos","events_url":"https://api.github.com/users/technorama/events{/privacy}","received_events_url":"https://api.github.com/users/technorama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-06T21:35:07Z","updated_at":"2015-09-07T12:36:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/manastech/crystal/pulls/1397","html_url":"https://github.com/manastech/crystal/pull/1397","diff_url":"https://github.com/manastech/crystal/pull/1397.diff","patch_url":"https://github.com/manastech/crystal/pull/1397.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/manastech/crystal/issues/comments/138285728","html_url":"https://github.com/manastech/crystal/pull/1397#issuecomment-138285728","issue_url":"https://api.github.com/repos/manastech/crystal/issues/1397","id":138285728,"user":{"login":"asterite","id":209371,"avatar_url":"https://avatars.githubusercontent.com/u/209371?v=3","gravatar_id":"","url":"https://api.github.com/users/asterite","html_url":"https://github.com/asterite","followers_url":"https://api.github.com/users/asterite/followers","following_url":"https://api.github.com/users/asterite/following{/other_user}","gists_url":"https://api.github.com/users/asterite/gists{/gist_id}","starred_url":"https://api.github.com/users/asterite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterite/subscriptions","organizations_url":"https://api.github.com/users/asterite/orgs","repos_url":"https://api.github.com/users/asterite/repos","events_url":"https://api.github.com/users/asterite/events{/privacy}","received_events_url":"https://api.github.com/users/asterite/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T12:36:26Z","updated_at":"2015-09-07T12:36:26Z","body":"I like the `max?`, `min?`, etc. variants and doing `[].max? || 0`, as @technorama suggested. I was going to suggest that myself too :-) It is consistent with the rest of the language and pretty easy to use. And `max` can be easily implemented on top of `max?`.\r\n\r\nIf we decide to do that, we might want to change `Enumerable#index` to raise and add `index?`, and the same goes for `find`. "}}