Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
To be fair, most real world, practical problems have more complex and less elegant solution requirements. This is a simple, elegant problem, and I figured it called for a simple, elegant solution. Plus, I disagree that this is less readable than the 4-5 line for loop/if block solutions- There's hardly any control flow to speak of, so it requires less effort to track how the algorithm works. It's just two simple data manipulation operations.
Yeah I think it tends to be a combination of some users coming from more of a immutable/functional language mindset and applying that paradigm to languages like Ruby. Also the highest voted solutions might to be voted on more because someone learned something from it, not that its the best solution for the job.
CodeWars voters seem to heavily prefer clever one-liners over readability or performance. There might be a way to influence that in a better direction ("better" in the "actually being a developer" sense)