Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Enumerable#reduce? for when input is empty #7941

Merged
merged 1 commit into from
Jul 1, 2019

Conversation

miketheman
Copy link
Contributor

Resolves #2155

Signed-off-by: Mike Fiedler [email protected]

@miketheman
Copy link
Contributor Author

Replaces #4828

@miketheman
Copy link
Contributor Author

Test failure seems unrelated.

@bcardiff
Copy link
Member

bcardiff commented Jul 1, 2019

I think the branch is based on some old commit. Could you rebase on master?

@miketheman miketheman force-pushed the miketheman/empty-reduce branch from 266733c to 1a34c8f Compare July 1, 2019 13:11
@miketheman
Copy link
Contributor Author

Rebased.

@asterite
Copy link
Member

asterite commented Jul 1, 2019

I guess this is fine.

If we go this route we'll probably need to add max?, max_by?, min?, min_by? and so on... (which might be fine too).

@bcardiff
Copy link
Member

bcardiff commented Jul 1, 2019

They are already there 🙃

@asterite asterite added this to the 0.30.0 milestone Jul 1, 2019
@asterite asterite merged commit 9503993 into crystal-lang:master Jul 1, 2019
dnamsons pushed a commit to dnamsons/crystal that referenced this pull request Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enumerable::EmptyError on Hash#reduce
3 participants