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

Matt Crocco solution #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Matt Crocco solution #80

wants to merge 1 commit into from

Conversation

glossawy
Copy link

@glossawy glossawy commented Jun 5, 2017

No description provided.

@glossawy
Copy link
Author

glossawy commented Jun 5, 2017

@jaybobo @jack-chester

@sjreich
Copy link

sjreich commented Jun 6, 2017

This looks good - I like that you see the options here. Check out each_with_object.

@glossawy
Copy link
Author

glossawy commented Jun 6, 2017

I must've missed each_with_object when reading through the Hash docs. Is it primarily useful from a semantic point of view? I see it being better than something like arr.reduce({}) { |h, k| h[k] += 1; h } and great for making a statement more concise.

@sjreich
Copy link

sjreich commented Jun 6, 2017

Yeah, in ruby there's almost always something nicer than the initial-value-which-you-operate-on approach of other languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants